Here's a portion of my code that I need to loop. Whether I put the "Loop" before or after the "End If", I get the error, "Loop without Do".
Do While rTC > 1
If InStr(StringToSearch, SearchTerm) > 0 Then
'put the Code in the cell to the left of the transaction detail
MsgBox "SearchTermWasFound"
Range("H1").Copy Destination:=Range("B" & rTC)
Range("B" & rTP, "E" & rTP).Copy Destination:=Worksheets("TransactionsSource").Range("B" & rTS, "E" & rTS)
rTC = rTC - 1
Loop
End If
???
Do While rTC > 1
If InStr(StringToSearch, SearchTerm) > 0 Then
'put the Code in the cell to the left of the transaction detail
MsgBox "SearchTermWasFound"
Range("H1").Copy Destination:=Range("B" & rTC)
Range("B" & rTP, "E" & rTP).Copy Destination:=Worksheets("TransactionsSource").Range("B" & rTS, "E" & rTS)
rTC = rTC - 1
Loop
End If
???