For the future, macros can not be tested on the image.
eg:
Sub AAA()
Dim rowCount As Long
Dim sourceRange As Range
On Error GoTo HandleError
Application.ScreenUpdating = False
With Worksheets("sheet1")
.Activate
Do
Set sourceRange = Nothing
'A runtime error is created when the range can not be defined ("abc" or/and "xyz" was not found)
Set sourceRange = .Range(.Range("A:A").Find("abc"), .Range("A:A").Find("xyz"))
If Not sourceRange Is Nothing Then
sourceRange.Copy
.Cells(rowCount + 1, "B").PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=True
sourceRange.Clear
rowCount = rowCount + 1
End If
Loop Until sourceRange Is Nothing
HandleExit:
.Range("A1").Select
End With
Exit Sub
HandleError:
If sourceRange Is Nothing Then
Resume HandleExit
Else
MsgBox Err.Number & vbLf & Err.Description, vbExclamation
End If
End Sub
Artik