SUMIF - match multiple names per cell?

Ajw43022

New Member
Joined
Aug 16, 2009
Messages
28
Not sure how to do this.

I have two columns. The first has 1-4 employee names in each cell, separated by commas. The second has an integer (hours).

I need a formula that calculates the cumulative hours worked by each employee.

This seems like SUMIF territory, but multiple employees to a cell presents a twist I don't know how to handle.

Any thoughts on doing this in Excel?
(What about in google spreadsheets, if possible?)

Thanks tons for any help.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
With names in A1 and hours in B1, try

=(LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1)*B1

Does that do what you're looking for?

edit:-

looking at barry's reply, I now realise that I mis-read what you wanted to do.
 
Last edited:
Upvote 0
If you want to calculate the hours for a specific employee try SUMIF with a wildcard, e.g.

=SUMIF(A:A,"*"&D1&"*",B:B)

where D1 contaisn a specific employee name
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,710
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top