Rotating dates

Luigi802

Board Regular
Joined
Oct 16, 2014
Messages
80
As you see below I have a list of dates that rotates ever week, the numbers in the right column are supposed to rotate with them. I'm pretty stuck, not sure how to even start this. the formulas I used are in the second list

Date #
19 Dec 14 1
26 Dec 14 2
02 Jan 15 1
09 Jan 15 2
16 Jan 15 1
23 Jan 15 2
30 Jan 15 1
06 Feb 15 2
13 Feb 15 1
20 Feb 15 2
27 Feb 15 1
06 Mar 15 2
13 Mar 15 1
20 Mar 15 2
27 Mar 15 1
03 Apr 15 2
10 Apr 15 1
17 Apr 15 2
24 Apr 15 1
01 May 15 2

[TABLE="width: 384"]
<tbody>[TR]
[TD]Date[/TD]
[TD]#[/TD]
[/TR]
[TR]
[TD]=DATE(2014,9,26)+CEILING(TODAY()-DATE(2014,9,26),7)[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]=D2+7[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]=D3+7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]=D4+7[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]=D5+7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]=D6+7[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]=D7+7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]=D8+7[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]=D9+7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]=D10+7[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]=D11+7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]=D12+7[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]=D13+7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]=D14+7[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]=D15+7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]=D16+7[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]=D17+7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]=D18+7[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]=D19+7[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]=D20+7[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]


So next week after the 19th of DEC that cell will change to 26 DEC but I want the 2 which is next to the 26 Dec to stay with that date i.e. The list starting 1, 2, 1, 2, will switch every week from starting with 1, 2, 1, 2, to starting 2, 1, 2, 1. Basically I just want the 1's to change to 2's and the 2's change to 1's every week. Does that make sense?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Luigi802,

Maybe....

Excel 2007
DE
226/12/20142
302/01/20151
409/01/20152
516/01/20151
623/01/20152
730/01/20151
806/02/20152
913/02/20151
1020/02/20152
1127/02/20151
1206/03/20152
Sheet3
Cell Formulas
RangeFormula
E2=ISODD(INT(D2/7))+1


Excel 2007
DE
219/12/20141
326/12/20142
402/01/20151
509/01/20152
616/01/20151
723/01/20152
Sheet3


Hope that helps.
 
Upvote 0
Luigi802,

Maybe....
Excel 2007
DE

<tbody>
[TD="align: center"]2[/TD]
[TD="align: right"]26/12/2014[/TD]
[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]02/01/2015[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]09/01/2015[/TD]
[TD="align: center"]2[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]16/01/2015[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]23/01/2015[/TD]
[TD="align: center"]2[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]30/01/2015[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]06/02/2015[/TD]
[TD="align: center"]2[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]13/02/2015[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]10[/TD]
[TD="align: right"]20/02/2015[/TD]
[TD="align: center"]2[/TD]

[TD="align: center"]11[/TD]
[TD="align: right"]27/02/2015[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]12[/TD]
[TD="align: right"]06/03/2015[/TD]
[TD="align: center"]2[/TD]

</tbody>
Sheet3

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: #E0E0F0"]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: #E0E0F0"]E2[/TH]
[TD="align: left"]=ISODD(INT(D2/7))+1[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]


Excel 2007
DE

<tbody>
[TD="align: center"]2[/TD]
[TD="align: right"]19/12/2014[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]26/12/2014[/TD]
[TD="align: center"]2[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]02/01/2015[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]09/01/2015[/TD]
[TD="align: center"]2[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]16/01/2015[/TD]
[TD="align: center"]1[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]23/01/2015[/TD]
[TD="align: center"]2[/TD]

</tbody>
Sheet3



Hope that helps.



Sorry I guess I could have been a little more clear. OK That works if I was actually using the numbers 1 & 2 I put that just to simplify my question. Although I could still use this if I reference another column, what I really want is for it to switch from "#A" to "#B", like say #A is 600 and #B is 1600 instead of 1 and 2. Thanks for this though at least I have something that will work for now but I'd really like to not have to use another column.
 
Last edited:
Upvote 0
Then try, in E2

=IF(ISODD(INT(D2/7)),600,1600)

If you don't wish to hard code the numbers then make reference to a pair of cells where you can set the numbers.
 
Upvote 0
Then try, in E2

=IF(ISODD(INT(D2/7)),600,1600)

If you don't wish to hard code the numbers then make reference to a pair of cells where you can set the numbers.

I do wish to hard code the numbers, I don't want to have to refer to another cell.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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