How to sum visible cells only based on criteria in Excel?
In Excel, it may be easy for us to sum cells based on criteria with the SUMIFS function. However, if there is a range of filtered data, to sum the visible cells only with one or more criteria as below screenshot shown, how could you achieve this task in Excel?
Sum visible cells only based on one or more criteria with helper column
Sum visible cells only based on one or more criteria with formula
Sum visible cells only based on one or more criteria with helper column
To get the total values of the visible cells only based on one or more criteria, you can create a formula helper column first, and then apply the SUMIFS function to get the total result.
For example, to get the total order of the product Hoodie in the filtered range, please do as this:
1. Enter or copy the following formula into a blank cell beside your data range, and then drag the fill handle down to fill this formula to other visible cells, see screenshot:
2. After getting the visible values of column D, you should use the below SUMIFS function to get the total value, see screenshot:
If there are more criteria need to be added, you just need to join the criteria within the SUMIFS function like this: =SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], [criteria_range3, criteria3], ...)
Sum visible cells only based on criteria with formula
You can also create a formula based on the SUMPRODUCT, SUBTOTAL, OFFSET, ROW and MIN functions together to sum visible cells based on one or more criteria in Excel.
Please copy or enter the below formula into a blank cell to output the result, and then press Enter key to get the result, see screenshot:
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
- Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
- Merge Cells/Rows/Columns and Keeping Data; Split Cells Content; Combine Duplicate Rows and Sum/Average... Prevent Duplicate Cells; Compare Ranges...
- Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
- Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
- Favorite and Quickly Insert Formulas, Ranges, Charts and Pictures; Encrypt Cells with password; Create Mailing List and send emails...
- Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
- Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
- Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
- Pivot Table Grouping by week number, day of week and more... Show Unlocked, Locked Cells by different colors; Highlight Cells That Have Formula/Name...
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!