Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a range of 5 columns 2000 rows long.
I need to look up one specific date in the 1st column. Is it faster to use ".Find" or " For Each...Next". I will not ".Select" the found item. Any advice much appreciated. Don |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
While I suspect the Find method will be faster, it might be easiest if
you checked the performance of the two options yourself. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... I have a range of 5 columns 2000 rows long. I need to look up one specific date in the 1st column. Is it faster to use ".Find" or " For Each...Next". I will not ".Select" the found item. Any advice much appreciated. Don |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Find would be faster, but it often has trouble with finding dates. I would
use application.Match Dim res as Variant, rng as Range, myDate as Date With Worksheets("Data") set rng = .Range(.Cells(1,1),.Cells(rows.count,1).End(xlup)) End With myDate = #12/23/2004# res = Application.Match(clng(myDate),rng,0) if not iserror(res) then msgbox "Found in cell " & rng(res).Address Else msgbox "Not found" End if -- Regards, Tom Ogilvy "Don Bowyer" wrote in message ... I have a range of 5 columns 2000 rows long. I need to look up one specific date in the 1st column. Is it faster to use ".Find" or " For Each...Next". I will not ".Select" the found item. Any advice much appreciated. Don |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel lack of compatibility | Excel Discussion (Misc queries) | |||
Help with GUI (for lack of a better term) | Excel Discussion (Misc queries) | |||
Nice idea lack of knowledge! | Excel Discussion (Misc queries) | |||
lack of chart uniformity | Excel Programming | |||
On the lack of control arrays. | Excel Programming |