I've got a worksheet with all the data in 1 column in the following sequence: date, name, data, comment, number, blank repeating for a month. I need to move the data cell and the number cell to the right to the date. So I am trying to write a simple loop:
For each date in the worksheet,
offset 2 cells down, copy
offset 1 column to the right, paste
offset 4 cells down, copy
offset 2 columns to the right, paste
Next date
Until the last date on the worksheet
So I am thinking to write something like this:
Not sure if the copy/paste part will work but before that I have stuck with finding each date. Could anyone please help?
For each date in the worksheet,
offset 2 cells down, copy
offset 1 column to the right, paste
offset 4 cells down, copy
offset 2 columns to the right, paste
Next date
Until the last date on the worksheet
So I am thinking to write something like this:
Code:
Sub data_move ()
Dim i as Integer
Dim d as Range
For each i
Find date and make it d
d.Offset(2,0).Copy
d.Offset(0,1).Paste
d.Offset(4,0).Copy
d.Offset(0,2).Paste
Next i
Not sure if the copy/paste part will work but before that I have stuck with finding each date. Could anyone please help?