Excel Office

Excel How Tos, Tutorials, Tips & Tricks, Shortcuts

Tag: SUM function

SUM function: Description, Usage, Syntax, Examples and Explanation

What is SUM function in Excel? SUM function is one of Math and Trig functions in Microsoft Office Excel that adds all numbers in a range of cells and returns the result. Syntax of SUM function The syntax for the SUM function in Microsoft Excel is: SUM( number1, [number2, … number_n] ) OR SUM ( cell1:cell2, [cell3:cell4], … ) Note: You can…

How to sum a total in multiple Excel tables

To sum a total in multiple tables, you can use the SUM function and structured references to refer to the columns to sum. See example below: Formula =SUM(Table1[column],Table2[column]) Note: the total row must be enabled. If you disable a total row, the formula will return the #REF error. Explanation In the example shown, the formula in I6 is: =SUM(Table1[Amount],Table2[Amount]) How this formula works…

How to create dynamic reference table name in Excel

To build a formula with a dynamic reference to an Excel Table name, you can use the INDIRECT function with concatenation as needed. Formula =SUM(INDIRECT(table&”[column]”)) Note: INDIRECT is a volatile function and can cause performance issues in larger, more complex workbooks. Explanation In the example shown, the formula in L5 is: =SUM(INDIRECT(K5&”[Amount]”)) Which returns the SUM of Amounts for three tables named “West”,…

How to create running total in an Excel Table

This tutorial shows illustrates a Running total in Excel Table. To create a running total in an Excel Table, you can use the INDEX function set up with a structured reference. Formula =SUM(INDEX([column],1):[@column]) Explanation  In the example shown, the formula in F5 is: =SUM(INDEX([Total],1):[@Total]) When copied down the column, this formula will return a running total at each row. How this…

How to reference named range different sheet in Excel

This tutorials shows how to reference a named range on another sheet. To achieve this, you can use the INDIRECT function with the required sheet syntax. Formula INDIRECT(“‘”&sheet&”‘!”&name) Explanation In the example shown, the formula in D6 is: =SUM(INDIRECT(“‘”&B6&”‘!”&C6)) Which returns the sum of the named range “data” on Sheet1. How this formula works The formula above evaluates something like…

Sum race time splits in Excel

If you need to add up (sum) up race time splits that are some combination of hours, minutes, and seconds, you can simply use the SUM function. However, you must take care to enter times with the right syntax and use a suitable time format to display results, as explained below. Formula =SUM(range) Explanation The formula in cell H5 is:…

Excel Data validation don’t exceed total

Using the example below, this tutorial shows how to create Data validation don’t exceed total in Excel. Formula =SUM(range)<=1000 Explanation To allow only values that don’t exceed a set sum, you can use data validation with a custom formula based on the SUM function. In the example shown, the data validation applied to B5:B9 is: =SUM($C$6:$C$9)<=1000 How this formula works Data validation…

IF with boolean logic in Excel

This tutorial shows how to calculate IF with boolean logic in Excel using the example below; Formula = IF(criteria1*criteria2*criteria3,result) Explanation In the example shown, the formula in F8 is: {=SUM(IF((color=”red”)*(region=”East”)*(quantity>7),quantity))} Note: this is an array formula, and must be entered with control + shift + enter. How this formula works Note: This example demonstrates how to replace a nested IF formula with a single IF…

If cell begins with x, y, or z in Excel

This tutorial shows how to calculate If cell begins with x, y, or z in Excel using the example below; Formula =SUM(COUNTIF(A1,{“x*”,”y*”,”z*”}))>0 Explanation To test values to see if they begin with one of several characters (i.e. begin with x, y, or z) , you can use the COUNTIF function together with the SUM function. In the example shown, the formula in…

Sum range with INDEX in Excel

This tutorial shows how to calculate Sum range with INDEX in Excel using the example below;  Formula =SUM(INDEX(data,0,column)) Explanation To sum all values in a column or row, you can use the INDEX function to retrieve the values, and the SUM function to return the sum.  This technique is useful in situations where the row or column being summed is dynamic, and changes based…

Lookup entire column in Excel

This tutorial shows how to Lookup entire column in Excel  using the example below; Formula =INDEX(data,0,MATCH(value,headers,0)) Explanation To lookup and retrieve an entire column, you can use a formula based on the INDEX and MATCH functions. In the example shown, the formula used to lookup all Q3 results is: =INDEX(C5:F8,0,MATCH(I5,C4:F4,0)) Note: this formula is embedded in the SUM function only…

Lookup and sum column in Excel

This tutorial shows how to Lookup and sum column in Excel  using the example below; Formula =SUM(INDEX(data,0,MATCH(val,header,0))) Explanation To lookup and return the sum of a column, you can use the a formula based on the INDEX, MATCH and SUM functions. In the example shown, the formula in I7 is: =SUM(INDEX(C5:F11,0,MATCH(I6,C4:F4,0))) How this formula works The core of this formula…

Calculate running total in Excel

This tutorial shows how to Calculate running total in Excel using the example below; Formula =SUM($A$1:A1) Explanation To calculate a running total, you can use the SUM formula with a mixed reference that creates an expanding range. In the example shown, the formula in cell D6 is: =SUM($C$6:C6) When this formula is copied down the column, it correctly reports a running total…

Sum bottom n values with criteria in Excel

This tutorial shows how to Sum bottom n values with criteria in Excel. You can use a combination of SUM function, SMALL function and IF function to get the sum bottom in the example below; Formula {=SUM(SMALL(IF(range1=criteria,range2),{1,2,3,N}))} Explanation To sum the bottom n values in a range matching criteria, you can use an array formula based on the SMALL function, wrapped inside the…

Calculate Weighted Average in Excel

To calculate a weighted average in Excel, simply use the SUMPRODUCT and the SUM function. 1. The AVERAGE function below calculates the normal average of three scores. Suppose your teacher says, “The test counts twice as much as the quiz and the final exam counts three times as much as the quiz”. 2. Below you can find the corresponding weights of the scores.…

How To Use AGGREGATE function to sum a range with errors in Excel

Excel functions such as SUM, COUNT, LARGE and MAX don’t work if a range includes errors. However, you can easily use the AGGREGATE function to fix this. 1. For example, Excel returns an error if you use the SUM function to sum a range with errors. 2. Use the AGGREGATE function to sum a range with errors. Explanation: the first argument (9) tells…

Example of Count with Or Criteria in Excel

How to count data based upon multiple criteria? Counting with Or criteria in Excel can be tricky. This article shows several easy to follow examples. 1. We start simple. For example, we want to count the number of cells that contain Google or Facebook (one column). 2a. However, if we want to count the number of rows that contain Google or Stanford (two columns), we cannot simply…

How to Sum Range with Errors in Excel

This example shows you how to create an array formula that sums a range with errors. You can also use the AGGREGATE function to sum a range with errors. 1. We use the IFERROR function to check for an error. Explanation: the IFERROR function returns 0, if an error is found. If not, it returns the value of the cell. 2. To sum the range…

Count Unique Values in Excel

This example shows you how to create an array formula that counts unique values. Examples: 1.. To count the number of 5’s, use the following function. We use the COUNTIF function.  2. To count the unique values (don’t be overwhelmed), we add the SUM function, 1/, and replace 5 with A1:A6. 3. Finish by pressing CTRL + SHIFT + ENTER. Note: The formula…

Count and Sum Functions in Excel

The most used functions in Excel are the functions that count and sum. COUNT function is one of the STATISTICAL functions while SUM function is one of the Math and Trig functions. You can count and sum based on one criteria or multiple criteria. Count To count the number of cells that contain numbers, use the COUNT function. Countif To count cells based on one criteria (for…