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 and delete contents

Have you try my code example I posted yesterday ?

You can change it to copy to C instead of B

I change
Cells(I, 1).Cut Cells(I - 1, 2)
To
Cells(I, 1).Cut Cells(I - 1, 3)


Sub Testing2()
Dim lr As Long
lr = Range("A" & Rows.Count).End(xlUp).Row

For I = 2 To lr Step 2
Cells(I, 1).Cut Cells(I - 1, 3)
Next I
On Error Resume Next 'In case there are no blank cells
Range(Cells(1, 1), Cells(lr, 1)).SpecialCells(xlCellTypeBlanks).EntireRow.Delet e
On Error GoTo 0
End Sub



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



"Mark64" wrote in message ...
If I have a set of data located in the first column similar as follows:

"Column A" "Column B" "Column C"
Data1*
* Example1
Data2*
* Example2
Data3*
* Example3

and so on..

Is it possible to create a macro to go through and search that column of
data and and move the contents from Column A to Column C and up one row as
follows:

"Column A" "Column B" "Column C"
Data1* * Example1

Data2* * Example2

Data3* * Example3

Then delete the row that the data was in so the final product is as follows:

"Column A" "Column B" "Column C"
Data1* * Example1
Data2* * Example2
Data3* * Example3