View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default macro to move cell contents and then delete the row

You can try this with
* data1

starting in row 2 in the A column

This example loop through 100 rows

Sub Testing()
For I = 2 To 100 Step 2
Cells(I, 1).Cut Cells(I - 1, 2)
Next I
On Error Resume Next 'In case there are no blank cells
Columns("A").SpecialCells(xlCellTypeBlanks).Entire Row.Delete
On Error GoTo 0
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Mark64" wrote in message ...
I have a single column of data located in Column A similar as follows:

"Column A" "Column B" "Column 3" "....."

Example1*
* data1
Example2*
* data2
Example3*
* data3

and so on. What I want to do is have a macro to move the contents as follows:

"Column A" "Column B" "Column 3" "....."

Example1* * 1

Example2* * 2

Example3* * 3

Then I want to delete the empty rows where the data used to be. Is this
possible?

Thanks