Subtotal multiple entries

M

MAD101

I have spreadsheet that has duplicate entries of employee names and their
hours worked. There could up to three entries for one employee with
additional hours worked. There is regular time and overtime hours. I want to
combine the hours so that they appear all in one line like a subtotal for
each employee. I know I can use subtotal for this but I would rather use a
macro or a formula to eliminat steps.
 
S

ShaneDevenshire

Hi,

You data layout is not clear to me but suppose you have emp ID in A1:A100,
the regular hours in B1:B100 and overtime in C1:C100. First thing to do is
get a list of each unique employee Name/ID - use the Data, Filter, Advanced
Filter, with Unique records on to generate a list of the Unique Names or ID
only. Suppose they come out in E1:E50


Now use a formula like the following in F1, be careful to use the $ sign
just as I have.
=SUMIF($A$1:$A$100,$E1,B$1:B$100)
and copy it down to F50
Then copy the range F1:F50 to G1:G50


That should do it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top