Timesheet Formula Hair Pull!

gloriousglenn

New Member
Joined
Apr 5, 2011
Messages
3
I have posted this query elsewhere (here) but I may not have worded it as well as I could and I didn't get very far....So here's hoping I can get the wording right this time and get my problem solved!!

I have multiple sheets in one spreadsheet.

I have employee numbers and then hours they have worked each day.

I would like to have a separate sheet with a cell that says "If a specific cell has employee number 1234 then add up the hours in that row" but the total needs to be a combined total of any occurrences of that employee number in each sheet.

I'm not even sure if that makes any better sense than my post on the other thread!!!

I have uploaded a test file to fileden (click here) in a hope that viewing an example will make it a bit clearer!

Here's hoping and thank you very much in advance.

Kind regards
Glenn
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
A sumif formula should resolve your problem. In you example spreadsheet, put this formula in cell C3 in "Overall Hours".

=SUMIF('Site 1'!$A$4:$A$15,'Overall Hours'!A3,'Site 1'!$M$4:$M$15)+SUMIF('Site 2'!$A$4:$A$15,'Overall Hours'!A3,'Site 2'!$M$4:$M$15)+SUMIF('Site 3'!$A$4:$A$15,'Overall Hours'!A3,'Site 3'!$M$4:$M$15)
 
Upvote 0
That, my friend, is exactly what I am after. Thank you so much! You wouldn't believe the time I've spent trying to sort that out! Many, many, many thanks.
 
Upvote 0
I have seen "$" used a lot in formulas before but never understood what it does! In the above example. What is benefit of the "$"? Could I not just use:

=SUMIF('Site 1'!A:A,'Overall Hours'!A3,'Site 1'!M:M)+SUMIF('Site 2'!A:A,'Overall Hours'!A3,'Site 2'!M:M)+SUMIF('Site 3'!A:A,'Overall Hours'!A3,'Site 3'!M:M)

I'm not knocking your formula, just trying to understand.

Also...Is there a way that instead of having to put 'Site 1', 'Site 2', Site 3' etc into the formula that it just looked in every sheet? The reason I ask this is because I have new 'Sites' added each week and that would mean I would have to change the formula constantly.

Fingers crossed!
Glenn
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,917
Members
452,949
Latest member
beartooth91

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