Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to find the first cell in a sorted ascending column of dates (Col A,
formatted as ddd dd/mm/yyyy) that is equal or greater than a user input date (Formatted as dd/mm/yy or dd/mm/yyyy). I use the following command : Range("A:A").Select Selection.Find(What:=Format(user_input, "#"), After:=ActiveCell, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate If the field in col A is numeric i.e. 38930 for Aug.1,2006 the command is successful. If it is formatted as Tue 01/08/2006 it is not successful. Is there something I have to change in the arguments of .find ? Mind you, I am not accustomed to object handling code (With .. End With and so on) Thanks in advance P.S. The Selection.Find command is successful for exact matches. I haven't tried yet the "greater than" possibility... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extracting date from Date and Time formatted cell | Excel Discussion (Misc queries) | |||
Find cells that are conditionally formatted | Excel Discussion (Misc queries) | |||
How do I find out how a cell is formatted | Excel Discussion (Misc queries) | |||
find date and copy selection | Excel Programming | |||
Find all formatted cells | Excel Programming |