If formula help!

PHIL.Pearce84

Board Regular
Joined
May 16, 2011
Messages
152
Office Version
  1. 365
Platform
  1. Windows
HI I have the following formula:

=IFERROR(IF(O2="Sun","Overtime X2",IF(O2="Sat",LOOKUP(U2,{0,"08:00","12:01"}+0,{#N/A,"Overtime X1.5","Overtime X2"}),LOOKUP(U2,{0,"17:31","23:59"}+0,{"Overtime X2",#N/A,"Overtime X1.5"}))),M2)

This formula works great for the "Sat" and "Sun" criteria, it doesn't seem to pick up the overtime on the weekdays though, maybe it would help if I explained the context.

Where it's not a sat/sun and instead Mon-Fri it should show as "Overtime X1.5" between the hours of 17:31-23:59 and then "Overtime X2" between the hours 00:00-06:00.

Anything that doesn't meet this criteria should return the value in M2
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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