Christine
Christine

Reputation: 1

Sum part of a column when the number of rows varies and the summation row is in between category rows

Here's a link to the image of the spreadsheet. I'm using this spreadsheet in Google Sheets to keep track of tasks with varying categories.

I want to sum the time the task will take in column F for every row with category specified such as "admin" and "cleaning". The number of rows will vary by day so I can't use set rows.

Upvotes: 0

Views: 46

Answers (1)

Kris
Kris

Reputation: 567

Your question isn't super clear, but I think this is what you want:

Using 'admin' as an example. Most formulas in Google Sheets are not case sensitive, and since you have both lowercase 'admin' and uppercase 'ADMIN' in the same column, it makes separating the two a little tricky.

The easiest way would be to change the total line from ADMIN to something like Admin Total, so that it is a different word than your category. In that case you would use:

=sumif(D2:D10, "admin", F1:F10)

But if you are not able to change the labels, then you need to use something like:

=query(D7:F12,"Select Sum(F) where D='admin' label Sum(F)''")

Upvotes: 1

Related Questions