Assistance with sum for multiple separate rows using multiple criteria please

49 Views Asked by At

I am trying to come up with a way to sum the hours by client for a horizontal table that will include multiple clients and employees.

The clients can change as a variable so ideally need to use the Hrs Worked criteria and the client to search through the table and add up the hours.

Simplified table

table simplified here

Tried my knowledge of sumifs and sumproduct combo's but no luck. Excel 365.

Appreciate any help - thanks!

1

There are 1 best solutions below

6
Black cat On BEST ANSWER

Pls. try this formula in C10 and copy down.

=LET(rng,C$2:I$5,client1,B10,SUM(IF(TOROW(CHOOSEROWS(rng,SEQUENCE(1,ROWS(rng)/2,1,2)))=client1,TOROW(CHOOSEROWS(rng,SEQUENCE(1,ROWS(rng)/2,2,2))),0)))

Adjust rng to the actual size of the client/Has worked data range. client1 to the first name cell of the result table.