Roster - 6 week om 2 weeks off Formula

Steves73

Board Regular
Joined
Oct 19, 2016
Messages
173
Office Version
  1. 365
Platform
  1. Windows
Hi All

I'm having trouble with a formula, as you can see below, Row 3 (Starting at CM3) has a formula that calculates a 41 day on 14 day off roster and formats automatically, Formula below


=IF($A3="","",IF(CM$1>=$C3,VLOOKUP(MOD(CM$1-$C3,$A3+$B3),{0,"W";41,"O"},2),""))

What I am trying to do is add in Travel Days (T) at the start of the 41 days (W), end of the 41 Days and the end of the off days (O) - I have manually entered how I need it to look in Row 5

Is anyone able to assist with modifying the above formula

Hope there ins enough information, I can upload the spread sheet if needed

Regards

Steve

1690341087977.png
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Your manually entered values do not match the description, so here is my guess -- adjust the 0,1,$A3,$A3+1 part as needed:
Excel Formula:
=IF($A3="","",IF(CM$1>=$C3,LOOKUP(MOD(CM$1-$C3,$A3+$B3),CHOOSE({1,2,3,4},0,1,$A3,$A3+1),{"T","W","T","O"}),""))
 
Upvote 0
Solution
Your manually entered values do not match the description, so here is my guess -- adjust the 0,1,$A3,$A3+1 part as needed:
Excel Formula:
=IF($A3="","",IF(CM$1>=$C3,LOOKUP(MOD(CM$1-$C3,$A3+$B3),CHOOSE({1,2,3,4},0,1,$A3,$A3+1),{"T","W","T","O"}),""))
Your guess was right on the mark, apologies on the incorrect manual description, but you got it. Thank you very much
 
Upvote 0

Forum statistics

Threads
1,215,072
Messages
6,122,968
Members
449,095
Latest member
Mr Hughes

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