I need to find the TEXT “HCE” anywhere in the cells D:D1000 and copy the found cell contents to a new cell 7 columns to the right of the cell with the text
then loop through the next cells.
This is thecode I have so far
Sub Find_HCE()
Const StrText = “HCE”
Dim rng As Range
Set rng = Range(“D:D1000”).Find(What:=StrText, LookIn:=xlValues, LookAt:=xlPart)
Do While Not rng Is Nothing
rng.Copy _
Destination:=Range(“K1000”).End(xlUp).Offset(0, 7)
Set rng = Range(“D:D1000”).FindNext
Loop
End Sub
Can you help with a correction?