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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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?


.

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
Spell Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
Put todays date in a cell by checking a box!! Martin Excel Discussion (Misc queries) 1 October 24th 05 09:01 PM
Date checking Johnny Excel Programming 2 July 27th 04 06:47 AM
checking what day a date is? neowok[_67_] Excel Programming 5 June 24th 04 12:41 PM
Help with Date checking code Mr. Clean[_2_] Excel Programming 2 February 20th 04 03:24 PM


All times are GMT +1. The time now is 01:35 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"