I'm trying to SUM the hours of employees. The list is sorted by WE date and name.

The employees name is in U3. I tried multiple variations of:


The arrayformula only returns the sum of values from the first line SUMIF returns 0

Here is what the data look like:


  • VLOOKUP only returns one entry per match. As for your SUMIF, it's written incorrectly. For starters, "=U3" would need to be simply U3. At a glance, however, there are other issues as well. An image is not terribly helpful, since it doesn't provide readily accessible date for the volunteer contributors here to work with (unless you expected people to start their own spreadsheet and manually enter your data themselves, which I'm sure you don't). Consider sharing a link to the spreadsheet or to a safe copy of it.
    – Erik Tyler
    Mar 29, 2022 at 21:02
  • Got it. Thanks. Apr 1, 2022 at 21:28

1 Answer 1


Use query() to get a list of all names and aggregate the hours, like this:

=query(Data_for_2022!B1:K, "select B, sum(K) where B is not null group by B", 1)

  • I feel really dumb. I didn't even think of using a query. You rock. Thank you!! Mar 31, 2022 at 1:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.