I am rewriting a botched Google Sheet my wife uses for keeping track of kids who volunteer at her library. Each day, the kids select a Group from a drop-down, their name, and enter their time in and out. The main sheet calculates their total hours rounded as well as the total hours of the day and total number of kids who volunteered.
What she wants me to do now is list out all of the kids who are part of the volunteer program and calculate how many hours they volunteered this week. I'll end up getting a total hour count and etc, but for right now I need to figure out how to get all instances of "Kid A" and get the sum of their hours worked.
I was trying to use countifs but I am not sure that's the best function to use. Written as a formula, it'd be something like:
For-Each (name in C9:C74) Sum corresponding value in G9:74
So if Kid A worked 3 times, thus his name is listed 3 times, and his hour counts are 1.25, 2.5, and 0.75, next to his name I'd want it to return 4.5.
Example:
CodePudding user response:
To make it even more simple, you can use SUMIFS...
=SUMIFS(G9:G74, C9:C74, "Kid A")
CodePudding user response:
It's always easier to answer questions when you supply some representative data as part of the question, but 'blindly' based on your description you should be able to do the following to get the required answer:
=query(C9:G74,"select C,sum(G) group by C",0)