mlafrance1
New Member
- Joined
- Jul 30, 2017
- Messages
- 5
Hi,
I have a Excel 2010 spreadsheet that is frustrating me. The command that I enter inside a For loop executes but instead of going to the next For item (of which there are many) it exits the loop and starts the sub at the beginning again.
Here is the offending loop -
Any advice is very much appreciated.
Mike
I have a Excel 2010 spreadsheet that is frustrating me. The command that I enter inside a For loop executes but instead of going to the next For item (of which there are many) it exits the loop and starts the sub at the beginning again.
Here is the offending loop -
Code:
Set rng = Range("J17:AA17")
'Evaluate the holes for skins
For Each myCell In rng
If myCell.Value = "" Then
MsgBox myCell.Address & " is not a skin cell."
'populate the Carry Forward
Range(myCell.Address).Offset(-16, 0).Value _ <--
= Range(myCell.Address).Offset(-16, 0).Value + Range("G18").Value <-- the offending code
ElseIf myCell.Value = "Skin" Then
MsgBox myCell.Address & " is a skin cell."
End If
Next myCell
MsgBox "Finished the loop."
Mike
Last edited by a moderator: