ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Rotate data by date (https://www.excelbanter.com/excel-discussion-misc-queries/121239-rotate-data-date.html)

Grid

Rotate data by date
 
I have a rotating 2 wk roster with dates across 14 columns and names down 6
rows. I would like to have the dates auto change by 14 days at the end of the
fortnight and at the same time move the names down a row with the bottom one
going back up to the top. Possible?
Grid

Bob Phillips

Rotate data by date
 
Public Sub Test()
Dim i As Long
Dim iLastRow As Long

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
Range("B1").Value = Range("O1").Value + 1
For i = 3 To 15
Cells(1, i).Value = Cells(1, i - 1).Value + 1
Next i

Rows(iLastRow).Cut
Range("A2").Insert Shift:=xlDown
End Sub



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Grid" wrote in message
...
I have a rotating 2 wk roster with dates across 14 columns and names down

6
rows. I would like to have the dates auto change by 14 days at the end of

the
fortnight and at the same time move the names down a row with the bottom

one
going back up to the top. Possible?
Grid





All times are GMT +1. The time now is 11:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com