Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding a Date
Hi,
Am trying to find a date on an Excel spreadsheet - tried the Find function as below: Cells.Find(What:="01/08/06", After:=ActiveCell, LookIn:=xlValues, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False).Activate Problem is the date varies - hence the date needs to be in a variable. Can't seem to get that part of it working - unsure of the syntax. Anyone any ideas?? -- Many thanks in advance for any assistance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding a Date
Hi
Dim mydate as String mydate = "01/08/06" Cells.find(What:=mydate,...... regards Paul Marek wrote: Hi, Am trying to find a date on an Excel spreadsheet - tried the Find function as below: Cells.Find(What:="01/08/06", After:=ActiveCell, LookIn:=xlValues, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False).Activate Problem is the date varies - hence the date needs to be in a variable. Can't seem to get that part of it working - unsure of the syntax. Anyone any ideas?? -- Many thanks in advance for any assistance |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Finding a Date
I think you need to be careful with format, so perhaps
Dim mydate As Date mydate = dateserial(2006,8,1) -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) wrote in message oups.com... Hi Dim mydate as String mydate = "01/08/06" Cells.find(What:=mydate,...... regards Paul Marek wrote: Hi, Am trying to find a date on an Excel spreadsheet - tried the Find function as below: Cells.Find(What:="01/08/06", After:=ActiveCell, LookIn:=xlValues, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False).Activate Problem is the date varies - hence the date needs to be in a variable. Can't seem to get that part of it working - unsure of the syntax. Anyone any ideas?? -- Many thanks in advance for any assistance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding a Date 90 days previous to present date | Excel Worksheet Functions | |||
FINDING THE DATE 75 DAYS AFTER A SPECIFIED DATE | Excel Worksheet Functions | |||
Finding a date range from given date | Excel Worksheet Functions | |||
finding a date/time in a list that is closest to an existing date/ | Excel Discussion (Misc queries) | |||
Finding the Monday date based on a different date in same week | Excel Worksheet Functions |