Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Conditional Formatting New Rule with Formulas in Excel
  • Use Data Form to input, edit and delete records in Excel
  • Understanding Pivot Tables in Excel
  • How to Sort by Color in Excel
  • How to Create Gantt Chart in Excel

References

  • How to use Excel ROWS Function
  • Vlookup Examples in Excel
  • Find closest match in Excel
  • To count total rows in a range in Excel
  • How to get first row number in range in Excel

Data Validations

  • Excel Data validation allow weekday only
  • Excel Data validation must contain specific text
  • Excel Data validation date in next 30 days
  • Excel Data validation must not contain
  • How To Create Drop-down List in Excel

Category: Others

Excel Tutorials for beginners, Intermediates and experts.

How to fill cell ranges with random number from fixed set of options in Excel

by

To quickly fill a range of cells with random numbers from a set of fixed options (i.e. 25,50,75,100), you can use a formula based on the CHOOSE and RANDBETWEEN functions. Formula =CHOOSE(RANDBETWEEN(1,4),num1,num2,num3,num4) Explanation In the example shown, the formula in B4 is: =CHOOSE(RANDBETWEEN(1,4),25,50,75,100) Which returns a random number from the numbers provided. How this formula …

Continue Reading

How to generate random number between two numbers in Excel

by

To generate random integers between two numbers, you can use the RANDBETWEEN function. Formula =RANDBETWEEN(lower,upper) Explanation In the example shown, the formula in B5 is: =RANDBETWEEN(1,100) This formula is then copied down from B5 to B11. The result is random numbers between 1-100. Note that the RANDBETWEEN function will generate new numbers whenever a change …

Continue Reading

How to fill cell ranges with random text values in Excel

by

To quickly fill a range of cells with random text values, you can use a formula based on the CHOOSE and RANDBETWEEN functions. Formula =CHOOSE(RANDBETWEEN(1,3),”Value1″,”Value2″,”Value3″) Note that RANDBETWEEN will calculate a new value whenever the worksheet is changed. Once you have values in the range, you may want to replace the formulas with values to …

Continue Reading

How to get random value from list or table in Excel

by

To get a random value from a table or list in Excel, you can use the INDEX function with help from the RANDBETWEEN and ROWS functions. Formula =INDEX(data,RANDBETWEEN(1,ROWS(data)),1) Note: this formula uses the named range “data” (B5:E104) for readability and convenience. If you don’t want to use a named range, substitute $B$5:$E$104 instead. Explanation In …

Continue Reading

How to generate random times at specific intervals in Excel

by

To generate random times in at specific intervals you can use the RAND function with the FLOOR function. See example below: Formula =FLOOR(RAND(),”0:15″) Explanation In the example shown, the formula in B6 is: =FLOOR(RAND(),”0:15″) which generates a random time at a 15-minute interval. How this formula works The RAND function generates a decimal number between …

Continue Reading

How to generate random number weighted probability in Excel

by

To generated a random number, weighted with a given probability, you can use a helper table together with a formula based on the RAND and MATCH functions. Formula =MATCH(RAND(),cumulative_probability) Explanation In the example shown, the formula in F5 is: =MATCH(RAND(),D$5:D$10) How this formula works This formula relies on the helper table visible in the range …

Continue Reading

How to generate random date between two dates in Excel

by

To generate random dates between two dates, you can use the RANDBETWEEN function, together with the DATE function. See example below: Formula =RANDBETWEEN(date1,date2) Explanation In the example shown, the formula in B5 is: =RANDBETWEEN(DATE(2016,1,1),DATE(2016,12,31)) This formula is then copied down from B5 to B11. The result is random dates between Jan 1, 2016 and Dec …

Continue Reading

How to calculate percent variance in Excel

by

You can calculate a percent variance by subtracting the original number from the new number, then dividing that result by the original. For example, if the baseline number is 100, and the new number is 110: =(110-100)/100 This formula can be used to calculate things like variance between this year and last year, variance between …

Continue Reading

How to calculate decrease by percentage in Excel

by

If you need to decrease a number by a certain percentage, you can use a simple formula that multiplies the number times the percent – 1. Formula =number*(1-percent) Explanation In the example, the active cell contains this formula: =C6*(1-D6) In this case, Excel first calculates the result of 1 – the value in D6 (.2) …

Continue Reading

How to get amount with percentage in Excel

by

If you have a total and a percentage that presents some amount of the total, you can calculate the amount represented by the percentage with a simple formula that multiples the total by the percentage. Formula = total * percent Explanation In the example, the active cell contains this formula: =C6*D6 To calculate the amount, …

Continue Reading

How to get original number from percent change in Excel

by

To calculate the original number based on current value and known percentage change, you can use a simple formula that divides the current value by the percent plus 1. Formula =current/(percent+1) Explanation In the example, the active cell contains this formula: =C6/(B6+1) In this case, Excel first calculates the result of B6 + 1, then divides C6 by the …

Continue Reading

How to get original price from percentage discount in Excel

by

If you have a discounted price and know the discount percentage, you can calculate the original price with a simple formula that divides the discounted price by the result of 1 minus the discount percentage. See example below: Formula =price/(1-discount) Explanation How the formula works In the example, the active cell contains this formula: =C6/(1-D6) …

Continue Reading

How to calculate percent change in Excel

by

If you need to calculate the percentage change between two values in Excel, you can use a formula that divides the change itself by the “old” value. A classic example would be to calculate the percentage between sales last month and sales this month. Formula =(new_value-old_value)/old_value Explanation In the example, the active cell contains this …

Continue Reading

How to calculate percentage discount in Excel

by

If you have a discounted price and an original price, and you want to know the discount as a percentage, you can calculate the percentage discount using a formula that divides the discounted price by the original price and then subtracts the result from one. Formula = 1-(discount_price/original_price) Explanation In the example, the active cell …

Continue Reading

How to calculate percentage of total in Excel

by

To calculate percent of a total (i.e. calculate a percent distribution), you can use a formula that simply divides an amount by the total. Formula =amount/total Explanation In the example shown, the formula in D6 is: =C6/$C$11 Note: the result is formatted with Percentage number format to show 25%, 10%, etc. How the formula works In the …

Continue Reading

How to calculate profit margin percentage in Excel

by

If you need to calculate a profit margin, you can easily do so with a simple formula that uses the sale price and the cost. Formula =(price-cost)/price Explanation In the example shown, the first formula looks like this: =(B4-C4)/B4 Make sure you use parentheses to control the order of operations. Note that the result will …

Continue Reading

How to calculate total from percentage in Excel

by

If you have an amount and the percentage that the amount represents of a total, you can calculate the total with a formula that simply divides the amount by the percentage. Formula = amount / percent Explanation In the example, the active cell contains this formula: =C6/D6 Excel simply divides the value in cell C6 …

Continue Reading

How to increase by percentage in Excel

by

If you need to increase a number by a certain percentage, you can use a simple formula that multiplies the number times the percent + 1. Formula =number*(1+percent) Explanation How this formula works In the example, the active cell contains this formula: =C6*(1+D6) In this case, Excel first calculates the result of 1 + the …

Continue Reading

How to calculate percent of goal in Excel

by

If you need to calculate percent of goal, you can do so with a simple formula that divides the actual by the goal amount, with the result formatted using the percentage number format. This same formula can be used to calculate things like percent of target, percent of budget, percent of forecast, and so on. …

Continue Reading

How to calculate percent of students absent in Excel

by

To calculate percent of students attending a class, given a total class size and the number of students attending, you can use a simple formula that divides students absent (calculated by subtracting attending from total) by the total. The result must be formatted using the percentage number format. Formula =(total-attended)/total Note: when working manually, percentage results …

Continue Reading

How to calculate percent sold in Excel

by

To calculate percentage sold, you can use a simple formula that divides sold amount by the total amount. Formula =sold/total Note: when working manually, percentage results are calculated by dividing one number by another, then multiplying by 100 to express as a percentage. However, because Excel can display decimal or fractional values automatically as a percentage by applying …

Continue Reading

How to calculate project complete percentage in Excel

by

To calculate the percentage complete for a project with a list of tasks, you can use a simple formula based on the COUNTA function. Formula =COUNTA(range1)/COUNTA(range2) Explanation In the example shown, the formula in F6 is: =COUNTA(C5:C11)/COUNTA(B5:B11) How this formula works At the core, this formula simply divides tasks complete by the total task count: …

Continue Reading

List worksheet index numbers in Excel

by

To list the index numbers of sheets in an Excel workbook, you can enter the sheet names, then use a formula based on the SHEET and INDIRECT functions. The SHEET function then returns the current index for each sheet as listed. Formula =SHEET(INDIRECT(name&”!A1″)) Explanation In the example shown, the formula in C5 is: =SHEET(INDIRECT(B5&”!A1″)) How …

Continue Reading

List sheet names with formula in Excel

by

To list worksheets in an Excel workbook, you can use a 2-step approach: (1) define a named range called “sheetnames” with an old macro command and (2) use an INDEX formula to retrieve sheet names using the named range. Formula =GET.WORKBOOK(1)&T(NOW()) Note: because this formula relies on a macro command, you’ll need to save as a macro-enabled workbook …

Continue Reading

How to get Excel workbook path only

by

If you want to get the workbook path (directory) only, you can do so with a formula that uses the LEFT and the FIND function. The result will look something like this: Drive:\path\to\file\ //Windows Drive:path:to:file: //Mac Formula =LEFT(CELL(“filename”,A1),FIND(“[“,CELL(“filename”,A1))-1) Explanation How the formula works The cell function is used to get the full file name and …

Continue Reading

How to create dynamic worksheet reference in Excel

by

To create a formula with a dynamic sheet name you can use the INDIRECT function. Note: The point of this approach is it lets you to build a formula where the sheet name is a dynamic variable. So, for example, you could change a sheet name (perhaps with a drop down menu) and pull in information …

Continue Reading

Create dynamic workbook reference to another workbook in Excel

by

To build a dynamic worksheet reference – a reference to another workbook that is created with a formula based on variables that may change – you can use a formula based on the INDIRECT function. See example below: Formula =INDIRECT(“‘[“&workbook&”]”&sheet&”‘!”&ref) Explanation In the example shown, the formula in E6 is: =INDIRECT(“‘[“&B6&”]”&C6&”‘!”&D6) How this formula works …

Continue Reading

Index and match on multiple columns in Excel

by

This tutorial shows how to calculate Index and match on multiple columns in Excel  using the example below; Formula {=INDEX(range1,MATCH(1,MMULT(–(range2=critera), TRANSPOSE(COLUMN(range2)^0)),0))} Explanation To lookup a value by matching across multiple columns, you can use an array formula based on the MMULT, TRANSPOSE, COLUMN, and INDEX. In the example shown, the formula in H4 is: {=INDEX(groups,MATCH(1,MMULT(–(names=G4), TRANSPOSE(COLUMN(names)^0)),0))} where …

Continue Reading

Count cells that do not contain many strings in Excel

by

This tutorial shows how to Count cells that do not contain many strings in Excel using the example below; Formula {=SUM(1-(MMULT(–(ISNUMBER(SEARCH(TRANSPOSE (exclude),data))),ROW(exclude)^0)>0))} Explanation To count cells that do not contain many different strings, you can use a rather complex formula based on the MMULT function. In the example shown, the formula in F5 is: {=SUM(1-(MMULT(–(ISNUMBER(SEARCH(TRANSPOSE …

Continue Reading

Count cells less than in Excel

by

This tutorial shows how to Count cells less than in Excel using the example below; Formula =COUNTIF(range,”<X”) Explanation To count the number of cells that contain values less than a particular number, you can use the COUNTIF function. In the generic form of the formula (above) rng represents a range of cells that contain numbers, …

Continue Reading

Count cells that contain errors in Excel

by

This tutorial shows how to Count cells that contain errors in Excel using the example below; Formula =SUMPRODUCT(–ISERR(range)) Explanation To count cells that contain errors, you can use the ISERR function, wrapped in the SUMPRODUCT function.  In the example shown, E5 cell contains this formula: =SUMPRODUCT(–ISERROR(B5:B9)) How this formula works SUMPRODUCT accepts one or more arrays, multiplies …

Continue Reading

Count cells that do not contain errors in Excel

by

This tutorial shows how to Count cells that do not contain errors in Excel using the example below; Formula =SUMPRODUCT(–NOT(ISERR(range))) Explanation To count the number of cells that contain errors, you can use the ISERR and NOT functions, wrapped in the SUMPRODUCT function. In the example, the active cell contains this formula: =SUMPRODUCT(–NOT(ISERR(B4:B8))) How this …

Continue Reading

Subtotal by color in Excel

by

This tutorial shows how to Subtotal by color in Excel using the example below; If you need to subtotal numbers by color, you can easily do so with the SUMIF function. Formula =SUMIF(color_range,criteria,number_range) Explanation In the example shown, the formula in G5 is: =SUMIF($B$4:$B$11,F5,$D$4:$D$11) How this formula works The SUMIF function takes three arguments: range, …

Continue Reading

Subtotal by invoice number in Excel

by

This tutorial shows how to Subtotal by invoice number in Excel using the example below; Formula =IF(COUNTIF(range,criteria)=1,SUMIF(range,criteria,sumrange,””) Explanation To subtotal values by invoice number, you can use a formula based on COUNTIF and SUMIF. In the example shown, the formula in E5 is: =IF(COUNTIF($B$5:B5,B5)=1,SUMIF($B:$B,B5,$D:$D),””) How this formula works This formula uses COUNTIF with an expanding range to …

Continue Reading

Subtotal invoices by age in Excel

by

This tutorial shows how to Subtotal invoices by age in Excel using the example below; Formula =SUMIF(age,criteria,amount) Explanation If you need to subtotal invoice amounts by age, you can easily do so with the SUMIF function. In the example shown, the formula in G5 is: =SUMIF(age,G5,amount) Where age is a named range for the range …

Continue Reading

Sum by group in Excel

by

This tutorial shows how to Sum by group in Excel using the example below; Formula =IF(B5=B4,””,SUMIF(B:B,B5,C:C)) Explanation To subtotal data by group or label, directly in a table, you can use a formula based on the SUMIF function. In the example shown, the formula in D5 is: =IF(B5=B4,””,SUMIF(B:B,B5,C:C)) Note: data must be sorted by the …

Continue Reading

3D SUMIF for multiple worksheets in Excel

by

This tutorial shows how to 3D SUMIF for multiple worksheets in Excel using the example below; Formula =SUMPRODUCT(SUMIF(INDIRECT (“‘”&sheets&”‘!”&”range”),criteria, INDIRECT(“‘”&sheets&”‘!”&”sumrange”))) Explanation To conditionally sum identical ranges that exist in separate worksheets, all in one formula, you can do so with the SUMIF function + INDIRECT, wrapped in SUMPRODUCT. In the example, the formula looks like …

Continue Reading

44 Practical Excel IF function Examples

by

This chapter takes you through 44 IF function Questions and Answers in Excel. EXCEL IF function tests a user-defined condition and returns one result if the condition is TRUE, and another result if the condition is FALSE Here are practical examples of  IF function test in Excel: Question 1: In Microsoft Excel, I’m trying to use the IF …

Continue Reading

Excel Operators

by

Excel Operators are simply functions used to perform/calculate Mathematical Operations. Although the Excel Operators are not, strictly speaking, Excel Functions, they are frequently used with Excel Functions and as a part of Excel Formulas. Therefore we have provided a brief explanation of Excel Operators in the following page: Excel Operators Excel Mathematical Operators – used to …

Continue Reading

Excel Default Templates

by

Book.xltx and Sheet.xltx are two special templates you can create and add to the XLStart folder. As a result, Excel uses Book.xltx as the basis for new workbooks and Sheet.xltx as the basis for new worksheets. Book.xltx To create Book.xltx, execute the following steps. 1. Create a workbook. For example, change the row height of all rows on the …

Continue Reading

Posts navigation

  • Previous
  • 1
  • 2
  • 3
  • Next

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • Nested IF function example in Excel
  • How to return blank in place of #DIV/0! error in Excel
  • Check multiple cells are equal in Excel
  • How to use Excel XOR Function
  • IF with wildcards in Excel

Date Time

  • Two ways to sum time over 30 minutes in Excel
  • Calculate expiration date in Excel
  • Calculate number of hours between two times in Excel
  • Get month from date in Excel
  • Get day from date in Excel

Grouping

  • Map text to numbers in Excel
  • How to randomly assign data to groups in Excel
  • Group numbers at uneven intervals in Excel
  • Group times into 3 hour buckets in Excel
  • Calculate conditional mode with criteria in Excel

General

  • How to calculate percent sold in Excel
  • How to generate random number between two numbers in Excel
  • How to fill cell ranges with random number from fixed set of options in Excel
  • How to get original number from percent change in Excel
  • Basic text sort formula in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning