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: 48
Default Non-Contiguos Range Iteration

I have a complex calculation that I need to write in VBA which can be
represented with the following example. I need to iterate through all
the cells in a noncontiguous range and starting from 1, put the number
of the rows iterated through into the cells in that row so I end up with
something like this:
J K L T U


313 1 1 1 1 1
314 2 2 2 2 2
315 3 3 3 3 3

The problem is that the method for iterating through a noncontiguous
range treats the cells as unrelated and hence I would have to iterate
through the J313:L315 range and only then go on to the T313:U315 range,
in which case I lose the count of the rows. (in the actual case, the
values to be placed in the rows is much more difficult to re-compute
then the row number). What I need to do, is iterate through row 313
(J-L, T-U), then row 314(same) then row 315(same).

Is there an easier way to do this?
thanks!

 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iteration Khalil[_2_] Excel Worksheet Functions 4 June 19th 09 08:21 PM
"Print titles must be contiguos and complete rows or columns?" Juan Diaz L Excel Discussion (Misc queries) 1 January 24th 08 04:47 PM
Need help with iteration Ron M. Excel Discussion (Misc queries) 7 March 14th 06 12:32 AM
Iteration M. Homayon Excel Discussion (Misc queries) 1 January 11th 06 01:05 AM
Iteration Jan Excel Discussion (Misc queries) 1 January 10th 06 11:10 PM


All times are GMT +1. The time now is 12:42 PM.

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"