hi,
i want to copy the rows directly beneath a cell i have just located based on a string but don't know how to refer to them. For example say i've just found a value in a20, i want to copy all the rows below this starting at 21 and copying all rows until the first empty cell is found in column a.
With Worksheets(Worksheets.Count).Range("a1:h20")
Set C = .Find("j smith", LookIn:=xlValues)
If Not C Is Nothing Then
firstAddress = C.Address
Do
****in here i want to copy the rows - how do i refer to them?????????????
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> firstAddress
End If
End With
i want to copy the rows directly beneath a cell i have just located based on a string but don't know how to refer to them. For example say i've just found a value in a20, i want to copy all the rows below this starting at 21 and copying all rows until the first empty cell is found in column a.
With Worksheets(Worksheets.Count).Range("a1:h20")
Set C = .Find("j smith", LookIn:=xlValues)
If Not C Is Nothing Then
firstAddress = C.Address
Do
****in here i want to copy the rows - how do i refer to them?????????????
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> firstAddress
End If
End With