the code below works fine until it no longer finds what I am looking for (example is AR)
When it has found the last of "AR" I get an error to debug and the section from Selection.find to False).Activate is highlighted yellow. Any help would be really appreciated.
Sub ARK_DEP()
For i = 1 To 200
Sheets("Departures").Select
Columns("E:E").Select
Selection.Find(What:="AR", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, -4).Select
ActiveCell.Select
ActiveCell.Select
ActiveCell.Resize(, 10).Select
'Selection.Copy
Application.CutCopyMode = False
Selection.Cut
Sheets("Arkansas").Select
ActiveSheet.Select
Range("J4:S200").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveSheet.Paste
Next i
End Sub
When it has found the last of "AR" I get an error to debug and the section from Selection.find to False).Activate is highlighted yellow. Any help would be really appreciated.
Sub ARK_DEP()
For i = 1 To 200
Sheets("Departures").Select
Columns("E:E").Select
Selection.Find(What:="AR", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, -4).Select
ActiveCell.Select
ActiveCell.Select
ActiveCell.Resize(, 10).Select
'Selection.Copy
Application.CutCopyMode = False
Selection.Cut
Sheets("Arkansas").Select
ActiveSheet.Select
Range("J4:S200").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveSheet.Paste
Next i
End Sub