If the For loop exited immediately, then i would equal 1, and i-1 would equal 0, and:
Range("R2:S" & i - 1).Copy would fail.
Say you want the macro to run on a sheet called "Special" not the sheet you happen to have active:
![]()
Sub dural() set MYSHEET=ActiveSheet Sheets("Special").Activate For i = 1 To 50 v = Cells(i, "T").Text If v = "" Or v = "#NUM!" Then Exit For Next Range("T1:T" & i - 1).Copy MYSHEET.Activate End Sub
Bookmarks