Checking Cell Value for a Date
Is there a way I can check to see if a cell value has a date value... in any
format? |
Checking Cell Value for a Date
Use VB's IsDate function. For example...
If IsDate(Range("A1").Value) Then ' A1 contains something VB can interpret as a date Else ' The contents of A1 does not look like a date to VB End If -- Rick (MVP - Excel) "Bishop" wrote in message ... Is there a way I can check to see if a cell value has a date value... in any format? |
Checking Cell Value for a Date
Any cell with an integer value between 0 and 2958465 can, with proper
formatting, represent a date. -- Gary''s Student - gsnu201002 "Bishop" wrote: Is there a way I can check to see if a cell value has a date value... in any format? |
Checking Cell Value for a Date
I thought the OP might want to check Text representations as well.
-- Rick (MVP - Excel) "Gary''s Student" wrote in message ... Any cell with an integer value between 0 and 2958465 can, with proper formatting, represent a date. -- Gary''s Student - gsnu201002 "Bishop" wrote: Is there a way I can check to see if a cell value has a date value... in any format? |
Checking Cell Value for a Date
You may be right. I didn't think of that.
-- Gary''s Student - gsnu201002 "Rick Rothstein" wrote: I thought the OP might want to check Text representations as well. -- Rick (MVP - Excel) "Gary''s Student" wrote in message ... Any cell with an integer value between 0 and 2958465 can, with proper formatting, represent a date. -- Gary''s Student - gsnu201002 "Bishop" wrote: Is there a way I can check to see if a cell value has a date value... in any format? . |
All times are GMT +1. The time now is 07:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com