Use AGGREGATE in Excel to ignore errors, hidden rows, and filtered data

Use Excel's AGGREGATE function to compute sums, averages, minima, maxima, and more while automatically ignoring errors, hidden rows, or filtered-out values.

What the video covers

Show how to build a basic AGGREGATE formula that performs a chosen calculation on a cell range while ignoring errors, hidden rows, or filtered values.

Watch the video on YouTube

Step-by-step instructions

  1. Select the result cell
    Click the cell where you want the aggregate result to appear.
  2. Start the formula
    Type =AGGREGATE( to begin the function.
  3. Choose the function number
    Enter the function number for the calculation you want (for example, 9 for SUM, 1 for AVERAGE, 4 for MAX, 5 for MIN). Type a comma after the number.
  4. Choose the option number
    Enter an option that tells Excel how to treat errors and hidden data. For example, 6 to ignore errors; options that also ignore hidden rows/filtered data exist—pick the one that matches your needs—then type a comma.
  5. Specify the range
    Select the range to aggregate (for example A2:A10).
  6. Close and confirm
    Close the parenthesis and press Enter. The AGGREGATE result appears, ignoring errors or hidden/filtered rows according to the option you chose.

Watch the video

Video thumbnail for Use AGGREGATE in Excel to ignore errors, hidden rows, and filtered data Play tutorial

Watch on YouTube

Why it matters

AGGREGATE prevents errors and hidden/filtered rows from breaking calculations. It replaces ad-hoc workarounds (like nested IFERROR or SUBTOTAL+helper columns) and works well on messy, real-world data.

Check your result

The cell shows the expected aggregate result (e.g., total, average) and the value does not change when the range contains error cells or when rows are hidden/filtered (depending on the option you selected).

Troubleshooting

If the result looks wrong: verify you used the correct function number (e.g., 9 = SUM, 1 = AVERAGE, 4 = MAX, 5 = MIN). If hidden rows still affect results, choose an option that ignores hidden rows (options 5, 6, 7 or 8 variants depend on Excel version). Make sure the selected range contains numeric values; text will be ignored for numeric aggregates.