Skip to content

Sum Based on Color

In this article, I will show you how to sum numbers based on the fill color of cells in Google Sheets.

Just follow the steps below.

Enter the SUBTOTAL Function

Select the cell where you want the total, and enter the following formula.

=SUBTOTAL(9, range-you-want-to-sum)
=SUBTOTAL(9, B2:B9)

The 9 (first argument) forces the SUBTOTAL function to calculate the sum. The SUBTOTAL function will then sum all the numbers in the selected range that are not filtered.

Filter the Data

Select the data. Include the headers, but do not include the total row.

Then go to Data Create a Filter.

Click on the filter button, and select Filter by Color > Fill Color > Select the fill color.

You now have the total for only those numbers related to the cells with the chosen fill color.

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back To Top