Roster spreadsheet using v/h lookup, sumproduct.sumif....??

Arafruafrog

New Member
Joined
Aug 25, 2017
Messages
11
Hi Forum

I am trying to simplify a roster spreadsheet for payroll.

Sheet 1 Roster - job, staff and days working

Jobshift hoursmontuewedthurfri
job 1 0930-1800sallybilltombobsally
job 2 0730-1600billsallybobpetebob
job 3 0800-1630tombobsallytompete
job 4
0900-1800petetompetepetetom

<tbody>
</tbody>

What I am trying to do is automatically populate the payroll spreadsheet with the data from the roster eg: hours worked by each staff member.
I have tried a v and hlookup table with job and hours and then a sumif to look for staff member in the roster week but can not get my logic correct...

I want the payroll data to update automatically if I change a staff member in the roster

Sheet2 for payroll

staffmontuewedthurfri
sally0930-18000730-16000800-16300930-1800
bill0730-16000930-1800sicksicksick
tom0800-16300900-18000930-18000800-16300900-1800
pete0900-1800arl0900-18000900-18000800-1630
bob0800-16300730-16000930-18000730-1600

<tbody>
</tbody>

Many thanks for any assistance from the excel gods....
Tee
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
This is probably do-able.

Question - how does sheet 2 know that Bill was sick on Wednesday ?
I can't see that data in sheet 1.
 
Upvote 0
Hi Gerald Thanks for your response.
No I am not sure how I can enter this - I was just going to copy the payroll data and paste it into another sheet and then manually correct the arl and sick days...
Cheers Tee
 
Upvote 0
OK let's park the sick and arl days for now.

Let's make some assumptions about how your data is laid out - adapt as required.
1) Your input data is on SHEET1, exactly as laid out in your OP, in the range A1:G5, with the the word "Job" in A1, and the entry for TOM on Friday on job 4 in cell G5.
2) Your output report is on SHEET2, again exactly as laid out in your OP, in the range A1:F6, with the word "Staff" in cell A1, and the entry for 0730-1600 for Bob on Friday in cell F6.

In cell B2 on SHEET2 input this formula
Code:
=INDEX(SHEET1!$B$2:$B$5,MATCH(SHEET2!$A2,OFFSET(SHEET1!$A$1,1,MATCH(SHEET2!B$1,SHEET1!$A$1:$G$1,0)-1,5,1),0))
and copy to the range B2:F6.

This formula is not perfect, for several reasons, including . . .
1) if someone does not work on a particular day (such as Bill on Wed/Thu/Fri) it returns #N/A - there are various ways of dealing with this, including wrapping the whole thing in an IFERROR statement or similar
2) it does not deal with sick / arl days.
 
Upvote 0
Excellent many thanks for that - I got it is work for some cells but not others...not sure why! I have copied it into the other cells.
Can I do an IFERROR that has a message included something like "Check"?
Cheers Tee.
 
Upvote 0
Can you do an IFERROR . . . ?

Sure, go right ahead.

If you need more help with this, please explain exactly what further help you need as it's not clear to me at the moment.
 
Upvote 0

Forum statistics

Threads
1,214,989
Messages
6,122,622
Members
449,093
Latest member
catterz66

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