ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   search value not formula with .Find (https://www.excelbanter.com/excel-programming/287297-search-value-not-formula-find.html)

Sunil Patel

search value not formula with .Find
 
Hi , i am using

Set CK = Range("B5:B11").Find("01-02-04")

where B5=a date e.g 31-01-04
B6="B5+1" e.g 01-02-04 * (cant find this cell)
B7+"B5+2" etc

B5 to B11 are date format "dd-mm-yy"

Thanks Sunil



Tom Ogilvy

search value not formula with .Find
 
("01-02-04")
will be interpreted mm-dd-yy in VBA. convert to a dateserial

DateSerial(2004,2,1)

--
Regards,
Tom Ogilvy

Sunil Patel wrote in message
...
Hi , i am using

Set CK = Range("B5:B11").Find("01-02-04")

where B5=a date e.g 31-01-04
B6="B5+1" e.g 01-02-04 * (cant find this cell)
B7+"B5+2" etc

B5 to B11 are date format "dd-mm-yy"

Thanks Sunil






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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com