Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Array as a "named range" - formula ok in cells, but error as "named range" | Excel Discussion (Misc queries) | |||
inserting a named range into new cells based on a named cell | Excel Discussion (Misc queries) | |||
Inspecting cells in a row in a named range | Excel Programming | |||
Compare a selected Range with a Named range and select cells that do not exist | Excel Programming | |||
Looping thru cells in a named range | Excel Programming |