Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding a Date 90 days previous to present date Vinod Excel Worksheet Functions 2 June 15th 09 01:18 PM
FINDING THE DATE 75 DAYS AFTER A SPECIFIED DATE vikkib Excel Worksheet Functions 2 July 3rd 08 07:28 PM
Finding a date range from given date Sarah (OGI) Excel Worksheet Functions 1 April 18th 07 03:08 PM
finding a date/time in a list that is closest to an existing date/ Jamie Excel Discussion (Misc queries) 1 May 27th 06 08:54 PM
Finding the Monday date based on a different date in same week dandiehl Excel Worksheet Functions 4 April 11th 06 06:03 PM


All times are GMT +1. The time now is 02:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"