Thread: Leave loop
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] carlos_ray86@hotmail.com is offline
external usenet poster
 
Posts: 67
Default Leave loop

I tried it and it does nothing. It actually does up to the copy and
then stops..never pastes


On Oct 15, 1:37*pm, wrote:
so I have this part of the loop doing what I want.
For i = 3 To 100
Worksheets("Shapes").Range("I5:I7").Copy
If IsEmpty(Worksheets("MAG").Cells(i - 1, 1)) Then
Worksheets("MAG").Cells(i - 1, 1).PasteSpecial Paste:=xlPasteValues,
Transpose:=True

Next

However, I want it to stop right after it pastes and leave the for
loop. So basically it reads the page where ever the next blank row is
it pastes then stops. thanks