![]() |
Subtotal multiple entries
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. |
Subtotal multiple entries
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. -- Thanks, Shane Devenshire "MAD101" wrote: 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. |
All times are GMT +1. The time now is 09:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com