Link to home
Start Free TrialLog in
Avatar of LUIS FREUND
LUIS FREUND

asked on

Adding hours from multiple worksheets

I have multiple timesheet tabs for each week until the end of the year.  Each worksheet the user will select a project number and put down hours against that project number.

I populated two tabs Time 10-21 and Time 10-28 with some project numbers and hours.  What I'm asking is on the "hours Tab" that the hours are being added from  each tab.  See hours on the "Hours Tab" for examples.

See attachment
C--Users-lfreund-Desktop-TTE-T-M-20.xlsm
Avatar of byundt
byundt
Flag of United States of America image

I put the following formula in Hours worksheet cell D2 and copied it down and across.
=SUMIF(INDIRECT("'TIME " & TEXT(D$1,"m-d") & "'!D:D"),$A2,INDIRECT("'TIME " & TEXT(D$1,"m-d") & "'!M:M"))

Open in new window

If you don't want to look at all the zeros, then consider using a Custom number format like #;-#;-;@ or possibly #;-#;;@
C--Users-lfreund-Desktop-TTE-T-M-20.xlsm
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LUIS FREUND
LUIS FREUND

ASKER

PERFECT AND AWESOME!   Thank you Byundt
I probably should have pointed out that the formula (and macro) rely on the worksheets being named exactly according to the pattern in the sample workbook. Any deviations in the worksheet name (perhaps an extra space, leading 0 in the date, missing hyphen, etc.) will result in a column of #REF! error values.