Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Named Range or through cells

In general, is it faster to go through each cell in a column when
looking for a particular value, or faster to reference a named range
for the area to search?

Thanks, Alan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Named Range or through cells

1. It is usually much faster to use the "Find" method.
2. Special cells can help narrow the search.
3. Not accessing the worksheet cells directly but referencing a Range Object
or loading the cell values into a Variant and then looping thru
one or the other is the next choice...

Set rngCol = Range("A10:A1000")
For Each rCell in rngCol
-or-
varRng = Range("A10:A1000").Value
For N = LBound(varRng, 1) To UBound(varRng, 1)
--
Jim Cone
Portland, Oregon USA



"Alan"
wrote in message
In general, is it faster to go through each cell in a column when
looking for a particular value, or faster to reference a named range
for the area to search?
Thanks, Alan


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 222
Default Named Range or through cells

Both are equally fast in properly designed code. The named range approach
means you use less code to restrict the search range, but ultimately it
should execute with equal precision.

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Alan" wrote:

In general, is it faster to go through each cell in a column when
looking for a particular value, or faster to reference a named range
for the area to search?

Thanks, Alan



Reply
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
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
Inspecting cells in a row in a named range Jim[_60_] Excel Programming 0 November 14th 05 10:33 PM
Compare a selected Range with a Named range and select cells that do not exist PCLIVE Excel Programming 1 October 18th 05 07:09 PM
Looping thru cells in a named range Michael Beckinsale Excel Programming 4 September 2nd 03 02:07 PM


All times are GMT +1. The time now is 06:13 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"