View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default VBA Code - Find & Move

Sorry - I read your move as move to the next cell, not move the cell to the next row.

Sub TryNow2()
Dim myC As Range
Dim myR As Long
Set myC = Cells.Find("REPO")
myR = myC.Row
myC.Cut myC(2)
Cells(myR, 1).EntireRow.Delete
End Sub

HTH,
Bernie
MS Excel MVP


"Youlan" wrote in message
...
Hi

Thanks for your response but I would also need to select the cell with
"REPO" once found and move it to cell directly below and then delete the row
where "REPO" was originally.

Can you help me with that please?

Regards,

"Bernie Deitrick" wrote:

Youlan,

Sub TryNow()
Dim myC As Range
Set myC = Cells.Find("REPO")
myC(2).Select
myC.EntireRow.Delete
End Sub

HTH,
Bernie
MS Excel MVP


"Youlan" wrote in message
...
Hi,

I'm using Excel 2002 and I need a code that can perform the following
operation:
1) Find text "REPO"
2) Once found, Move to the cell directly below it (-1, r)
3) Delete Entire Row where text was originally (+ ,r )

Thanks in advance