Sara has attended:
Excel Advanced course
Excel Advanced - Formulas & Functions course
Excel
I’m trying to write a formula to look up the persons name in each instance in the first column, then count the number of days for each instance and return the total value in one cell. I would prefer not to use a pivot table.
Name Hours Days
Sam Clark 240 4
Jamie Richards 480 8
Sam Clark 240 4
Jamie Richards 480 8
Sam Clark 240 4
Jamie Richards 480 8
Jamie Richards 480 8
Sam Clark 120 2
Sam Clark 60 1
Jamie Richards 480 8
Sam Clark 240 4
Sam Clark 180 3
Sam Clark 180 3
Sam Clark 120 2
Emma Brown 120 2
RE: Excel
Hi Sara
Thanks for getting in touch. This looks like a SUMIF function would be the best bet. I'm assuming in your data that the columns are A, B and C.
In your result cell, the formula would be:
=SUMIF(A2:A16,"Sam Clark",C2:C16)
The first argument is where to search for your criteria. The second is what you are actually searching for. Finally the third argument is when a result is found, which information is to be totalled.
You could substitute the second argument with a cell reference, where you've written their names. You could then drag the formula down easily. I've attached a sample workbook to give you an idea.
Kind regards
Gary Fenn
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector