Thread: copy cells down
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jean-Yves[_2_] Jean-Yves[_2_] is offline
external usenet poster
 
Posts: 253
Default copy cells down

Hi
This will search from bottom to top to any cell containg "ABC"

Sub test
Dim x As Integer
For x = Range("B2", Range("B2").End(xlDown)).Rows.Count - 1 To 1 Step -1
If Range("B2").Offset(x, 0) = "ABC" Then
Range("B2").Offset(x, 0).Resize(1, 4).Cut Range("B2").Offset(x + 1, 0)
End If
Next x
End sub
Regards
Jean-Yves


"andresg1975" wrote in message
...
how can i create a loop macro that look for a data in a specific column,
lets
say column B, select that cell, select 3 cells to the right, cut these
selection and move one row down. Continue the same procedure until there
is
no more cells containing the data. Thanks for your help