LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 224
Default Find next occupied row up in another column

I'm using this array formula to find the next occupied row up, in
another column, from the current row:

{=(IF(D2<"",ROW(),ROW(INDIRECT("D"&MAX(IF($D$1:D2 ="",0,ROW($D
$1:D2)))))))}

It works, but the data is already over 13,000 rows, and the project is
trending toward around 30,000 rows. The formula is fast for the first
few thousand or so rows, but becomes very slow toward the last few
thousand or so rows, due to doing so many comparisons.

Is there a more efficient way to get the next occupied row up, in
another column, from the current row?

There probably won't ever be more than a thousand rows between
occupied cells (though there could be; there is no limit), so I could
change the formula at around row 1,000 to only look as far up as 1,000
rows above. That would calculate faster, but eventually this will be
used by others who will be inserting and deleting rows, and I'd prefer
something more robust.

Any ideas?


Thanks,

Greg
 
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
Selecting occupied cell over empty ones Rich Excel Discussion (Misc queries) 0 March 28th 07 02:53 AM
Selecting occupied cell over empty ones Teethless mama Excel Discussion (Misc queries) 1 March 28th 07 02:13 AM
Selecting occupied cell over empty ones Rich Excel Discussion (Misc queries) 0 March 28th 07 12:05 AM
How do I insert a watermark over many already occupied cells? Patrick Padovani Excel Discussion (Misc queries) 1 August 15th 06 12:32 PM
Excel, how to count every 4th cell in column to see if occupied? Ashley Excel Worksheet Functions 4 July 19th 06 07:27 PM


All times are GMT +1. The time now is 08:49 AM.

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

About Us

"It's about Microsoft Excel"