Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding a date value in Excel

Status
Not open for further replies.

acdetc

MIS
Aug 25, 2004
2
US
I'm trying to open a worksheet, and determine what row a specific Date (e.g. 08/01/2004) is in. I found this code:

Set FoundCell = Range("A1:A100").Find (what:="7/18/1998")

which creates an object 'FoundCell'. I assume it is a Range object, but I can't seem to access any of it's properties?
 
acdetc,

If there are REAL DATES in column A then "7/28/1998" will NEVER work. Why? Because REAL DATES are NUMBERS and NOT STRINGS.
Code:
Set FoundCell = Range("A1:A100").Find (what:=DateSerial(1998,7,28))


Skip,

[red]Be advised:[/red] [glasses]
Alcohol and Calculus do not mix!
If you drink, don't derive! [tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top