2/13/23

Subtotal Formula

The Excel SUBTOTAL formula is a versatile function that can be used to perform calculations on a filtered set of data. It supports a variety of calculation types, such as SUM, AVERAGE, COUNT, MAX, and MIN, and provides a convenient way to perform these calculations without including hidden rows or filtered-out data.

For example, if you have a large table of data and you want to calculate the sum of the values in a specific column, you can use the SUBTOTAL formula with the SUM calculation type. The formula "=SUBTOTAL(9,B2:B10)" will calculate the sum of the values in the range B2 to B10, excluding any hidden rows.

In the Excel SUBTOTAL formula, the first argument is a calculation type that determines what type of calculation to perform. The calculation type is specified as a number between 1 and 11, or between 101 and 111.

Here are some of the most commonly used calculation types:

  1. AVERAGE

  2. COUNT

  3. COUNTA

  4. MAX

  5. MIN

  6. PRODUCT

  7. STDEV

  8. STDEVP

  9. SUM

  10. VAR

  11. VARP

The difference between the calculation types 1 to 11 and 101 to 111 is that calculation types 1 to 11 include values in hidden rows, while calculation types 101 to 111 exclude values in hidden rows.

The calculation type argument in the SUBTOTAL formula determines what type of calculation to perform and whether or not to include values in hidden rows. By using the correct calculation type, you can easily perform calculations on filtered data and exclude hidden rows as needed. Whether you're working with a large data set or just want to perform calculations on a subset of your data, the SUBTOTAL formula can save you time and make your data analysis more efficient.

Previous

Advanced Text Formulas

Next

Excel Formulas (One Column vs Multiple Columns?)