Excel SUBTOTAL Function: Efficient Data Analysis

The SUBTOTAL function in Excel provides a versatile way to perform calculations on data that is filtered or grouped. Unlike the SUM function, SUBTOTAL offers various aggregate functions and can adapt to data changes. 

how-to-use-subtotal-in-excel
How Do You Use the SUBTOTAL Function in Excel

How Do You Use the SUBTOTAL Function in Excel?

The SUBTOTAL function allows you to perform calculations like SUM, AVERAGE, COUNT, and more on filtered data. The syntax is:

=SUBTOTAL(function_num, range1, [range2], ...)

For example:

=SUBTOTAL(9, A2:A10)

This calculates the sum of values in the range A2

, taking into account any filters applied.

What Is the SUBTOTAL 9 in Excel?

In SUBTOTAL, the number 9 refers to the SUM function. So, =SUBTOTAL(9, A2:A10) will sum up the values in A2

, including only visible cells if filters are applied.

Read: 

Automating Tasks with Excel’s IFERROR Function

Why Use SUBTOTAL Instead of SUM?

The SUBTOTAL function is preferred over SUM when working with filtered data because it ignores hidden rows and focuses only on visible ones. This is particularly useful in reports and pivot tables where data visibility changes frequently.

What Is the Difference Between SUBTOTAL 9 and 109?

9: Calculates the sum of visible cells in a range.

109: Also calculates the sum but includes hidden rows in the calculation. This is useful when you want to perform a calculation that considers all data, even if it’s not currently visible due to filtering.

What Does SUBTOTAL 101 Mean in Excel?

The number 101 represents the AVERAGE function in SUBTOTAL. For example:

=SUBTOTAL(101, A2:A10)

This calculates the average of visible cells in the range A2.

Read: 

How Do I Trim and Clean Data in Excel?

When Creating a SUBTOTAL Formula, What Is the Difference?

The difference lies in the function numbers used:

1 to 11: Calculate the function including hidden cells (e.g., 1 for AVERAGE, 2 for COUNT).

101 to 111: Calculate the function excluding hidden cells (e.g., 101 for AVERAGE, 102 for COUNT).

Can You Do Two Different Subtotals in Excel?

Yes, you can apply multiple SUBTOTAL functions in different columns or rows. For example, use =SUBTOTAL(9, A2:A10) in one column for the sum and =SUBTOTAL(101, B2:B10) in another for the average.

What Is the Advantage of SUBTOTAL in Excel?

SUBTOTAL is advantageous because it dynamically adjusts to changes in data visibility (due to filtering). It simplifies reporting by focusing on only the relevant data and avoids manual adjustments. 

How Do I Find the Difference Between Two Sums in Excel?

To find the difference between two sums, subtract one SUM from another:

=SUM(A2:A10) - SUM(B2:B10)

What Is the Formula for Calculating Difference in Excel?

The formula to calculate the difference between two values is:

=Value1 - Value2

For example:

=C2 - C3 

How to Apply Difference Formula in Excel for Entire Column?

To apply a difference formula across an entire column, use relative references. For instance, if calculating the difference between columns A and B, enter the formula in C2:

=A2 - B2

Then drag the formula down the column.

Read: 

Excel ROUND Function: How and When to Use It

How Do I Calculate the Difference Between Two Columns in Excel?

To calculate the difference between two columns, use a formula similar to:

=A2 - B2

Apply this formula in a new column, and drag it down to compare all rows.

How Do I Compare Two Sets of Data in Excel for Differences?

To compare two data sets, use the formula:

=IF(A2=B2, "Match", "No Match")

This highlights differences between two columns of data.

How to Find the Difference Between Two Text Cells in Excel?

Finding differences in text cells involves comparing strings using formulas or conditional formatting. For example:

=IF(A2=B2, "Same", "Different")

This formula checks if text in A2 matches B2.

How to Find the Difference Between Two Sheets in Excel?

To find differences between two sheets, use the formula:

=IF(Sheet1!A2<>Sheet2!A2, "Different", "Same")

Apply this across cells to identify discrepancies between two sheets.

How to Sum Subtotals in Excel

To sum subtotals, simply use the SUM function on the cells containing the subtotals. For example:

=SUM(D2:D10)

Where D2

contains subtotal results.

The SUBTOTAL function offers flexibility and efficiency in managing and analyzing data, especially when working with filtered or grouped information. Mastering SUBTOTAL and understanding its function numbers can significantly enhance your data analysis in Excel. 

Comments