Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro I have written as follows that will only loop once once when
run via Excel spreadsheet (ctrl-Shift-r). But if I step through the code the loop will work just fine and run as many times as needed (423 in this case) What am I missing here? i = 3 Do While i < 423 iSearch = Range("D" & i).Value With Worksheets("Eff&PerData").Range("D1:D" & iEffRows) Set c = .Find(iSearch, LookIn:=xlValues) End With If c Is Nothing Then Worksheets("EFF_Place_Holders").Select Range("A" & i & ":J" & i).Select Selection.Copy Worksheets("Eff&PerData").Select Range("A" & iEffRows).Select ActiveSheet.Paste iEffRows = iEffRows + 1 'Not Found Else Debug.Print "" 'Found End If i = i + 1 Loop End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find loop doesn't loop | Excel Discussion (Misc queries) | |||
For... Next Loop | Excel Discussion (Misc queries) | |||
getting out of a if loop | Excel Discussion (Misc queries) | |||
Worksheet_Change - loop within a loop | Excel Programming | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |