LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 468
Default For each

I've assigned a Obj variable: Set oRng=C3:P84 (there are 84 elements/items)
So I then have

Dim c as Range
'code
For each c in oRng

Next c

As I step thru the code I need to perform an action when (using IF)
c reaches element, say 32 -- How is this done using the For each method?
I know I could assign a counter i (and do the i = i + 1 inside), but is that
necessary using the For each.

Thanks in advance..

Jim

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"