How to sum only visible cells in excel
Tutor 5 (37 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
Summing only visible cells means Excel returns a total that ignores values in hidden rows or filtered rows. Excel performs this operation through functions that recognize visible cells only.
How to sum only visible cells in Excel
To sum only visible cells in Excel:
1. Use the SUBTOTAL function
The SUBTOTAL function processes filtered or manually hidden rows depending on the function number.
Function structure\text{SUBTOTAL}
(\text{function\_num}, \text{range})
Most used function numbers
-
109 returns a sum and ignores hidden rows and filtered rows.
-
9 returns a sum but includes manually hidden rows and ignores filtered rows.
Steps
-
Select the cell where the result should appear.
-
Enter the formula:
= \text{SUBTOTAL}(109, A1:A20)
-
Apply filters or hide rows.
-
View the updated total in the formula cell.
Windows and Mac differences
SUBTOTAL behaves the same on both Windows and Mac. No version differences affect this function.
2. Use the AGGREGATE function
The AGGREGATE function offers more control because it combines operation type and options in a single formula.
Function structure
\text{AGGREGATE}
(\text{function\_num}, \text{options}, \text{range})
Most used options for visible-only sums
-
5 ignores hidden rows.
-
7 ignores hidden rows and error values.
Steps
-
Select the target cell.
-
Enter the formula:
-
Hide rows or filter the data.
-
View the total that changes according to visible values.
Windows and Mac differences
AGGREGATE works identically in Windows and Mac versions.
Does AutoSum sum only visible cells?
Yes, AutoSum works with SUBTOTAL in filtered lists. Excel inserts SUBTOTAL automatically when the AutoSum button is used inside a filtered column.
Steps
-
Filter your data.
-
Click the cell under the numeric column.
-
Select AutoSum on the ribbon.
-
Confirm the SUBTOTAL formula and press Enter.
How to sum selected visible cells only
To sum a non-contiguous set of visible cells:
Steps
-
Select the visible cells manually by holding Ctrl (Windows) or Command (Mac).
-
Look at the Status Bar at the bottom of Excel.
-
View the Sum indicator that shows the total for only the selected visible cells.
The status bar does not require formulas.
Common issues and solutions
The formula includes hidden cells
SUBTOTAL uses the wrong function number. Replace it with 109 to ignore all hidden rows.
Excel sums filtered but not hidden rows
AGGREGATE with option 5 ignores both manually hidden and filtered rows.
The total does not update after filtering
The formula references entire columns without proper ranges. Adjust the range to include only your dataset.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
Excel chart axis labels not showing
Answers · 1
Excel chart title not showing
Answers · 1
Excel chart labels not showing
Answers · 1
Excel chart not showing data
Answers · 1