i want to write a loop that will run until it reaches cell E333, starting at
E1.
i want to write a loop that will run until it reaches cell E333, starting at
E1.
You should write a macro resembling this:
Sub myMacro ()
set myRange = Range("E1:E333")
For Each c in myRange.Cells
' precise what You want to do with those cells
Next c
End Sub
"For" will not work because i am not running the code 333 times. Would this
code compile:
Do While in MyRange.Cells
xxx
Loop
"rumi" wrote:
> You should write a macro resembling this:
>
> Sub myMacro ()
> set myRange = Range("E1:E333")
> For Each c in myRange.Cells
> ' precise what You want to do with those cells
> Next c
> End Sub
>
>
That was my original plan, until i realized i don't want to run it 333, or
once per cell. The code in the loop is searching for a specific value, i want
the search to only take place between E1 and E333, and once it reaches E333
stop searching.
"Jim May" wrote:
> For i = 1 to 333
> 'your code here
> next i
>
>
> "Rob" wrote:
>
> > i want to write a loop that will run until it reaches cell E333, starting at
> > E1.
For i = 1 to 333
'your code here
next i
"Rob" wrote:
> i want to write a loop that will run until it reaches cell E333, starting at
> E1.
shouldn't take that long to do it, just turn off the screenupdating.
--
Gary
"Rob" <[email protected]> wrote in message
news:[email protected]...
> That was my original plan, until i realized i don't want to run it 333, or
> once per cell. The code in the loop is searching for a specific value, i
> want
> the search to only take place between E1 and E333, and once it reaches
> E333
> stop searching.
>
> "Jim May" wrote:
>
>> For i = 1 to 333
>> 'your code here
>> next i
>>
>>
>> "Rob" wrote:
>>
>> > i want to write a loop that will run until it reaches cell E333,
>> > starting at
>> > E1.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks