VBA/Formula Help

Scott_T_27

New Member
Joined
Nov 22, 2018
Messages
7
Hi All

New to the forum but hopeful someone can help.

This is a wok project I have been tasked with but it has me beat.

We process payroll weekly but during overtime season it becomes a bit of a pain as our T&A system doesn't deduct a break when employees have done the required amount of overtime.
See attached image of spreadsheet that we get from T&A system
What I need is a formula or something that will check columns F to L to see if it contains 10+ hours, and then providing column E states either "Day Shift" or "Night Shift" deduct 0.25 from the appropriate cell in F to L. The reason I need it to check column E is I have people that work 10 hour weekend shifts who do not require the 0.25 deducted.

Sorry but my work PC will not let me add the image but data is arranged as follows
A Employee No., B Forename, C Surname, D Branch, E Shift, F Mon, G Tue, H Wed, I Thu, J Fri, K Sat, L Sun, M Total Hours

Thanks in advance.

Scott
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi Scott,


Please provide some sample values and the expected output, then someone will be faster than me and provide a solution.


Tai
 
Upvote 0
Sorry

Employees work any 5 days out of 7 on a rota basis, working a standard 7.5 hours per day. Can do up to 4 hours overtime per day so maximum would be 11.5 hours on any single day.
Weekend workers work 4 days at 10 hours per day so maximum would be 14 hours.

Thanks
 
Upvote 0
try this


Book1
ABCDEFGHIJKLM
1Employee No.ForenameSurnameBranchShiftMonTueWedThuFriSatSunTotal Hours
2Day Shift88101284453.5
3Night Shift88101284453.5
488101284454
Sheet6
Cell Formulas
RangeFormula
M2=SUM(F2:L2)-IF(OR(E2="Day Shift",E2="Night Shift"),0.25*COUNTIF(F2:L2,">=10"),0)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,161
Members
453,021
Latest member
Justyna P

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