Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Question
I've tried using the following code to find a time stamp
Cells.Find(What:="21:30:00", After:=ActiveCell, LookIn:=xlValues, LookAt _ :=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate Which works to find the time 21:30:00. But the following does not work Dim TimeMatch As Date TimeMatch = Range("K6").Value Cells.Find(What:=TimeMatch, After:=ActiveCell, LookIn:=xlValues, LookAt _ :=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate Can anyone tell me why or what I'm doing wrong. Thanks, -Ray |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Question
How about:
Sub LostandFound() Dim TimeMatch As String TimeMatch = Range("K6").Text Cells.Find(What:=TimeMatch, After:=ActiveCell, LookIn:=xlValues, LookAt _ :=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate End Sub -- Gary''s Student - gsnu200856 "Ray" wrote: I've tried using the following code to find a time stamp Cells.Find(What:="21:30:00", After:=ActiveCell, LookIn:=xlValues, LookAt _ :=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate Which works to find the time 21:30:00. But the following does not work Dim TimeMatch As Date TimeMatch = Range("K6").Value Cells.Find(What:=TimeMatch, After:=ActiveCell, LookIn:=xlValues, LookAt _ :=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate Can anyone tell me why or what I'm doing wrong. Thanks, -Ray |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I find my question? | Excel Discussion (Misc queries) | |||
find question | Excel Programming | |||
how to find my question | Excel Discussion (Misc queries) | |||
find question | Excel Programming | |||
find question | Excel Programming |