PC Review


Reply
Thread Tools Rate Thread

Checking Cell Value for a Date

 
 
Bishop
Guest
Posts: n/a
 
      6th May 2010
Is there a way I can check to see if a cell value has a date value... in any
format?
 
Reply With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      6th May 2010
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" <(E-Mail Removed)> wrote in message
news:CCB34A4E-EFAD-43DD-A11E-(E-Mail Removed)...
> Is there a way I can check to see if a cell value has a date value... in
> any
> format?


 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      6th May 2010
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 With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      6th May 2010
I thought the OP might want to check Text representations as well.

--
Rick (MVP - Excel)



"Gary''s Student" <(E-Mail Removed)> wrote in message
news:6311C675-02FF-40A0-BD33-(E-Mail Removed)...
> 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 With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      6th May 2010
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" <(E-Mail Removed)> wrote in message
> news:6311C675-02FF-40A0-BD33-(E-Mail Removed)...
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 make 1 date cell automatically change another date cell Scotty Microsoft Excel Worksheet Functions 3 22nd Apr 2010 06:15 AM
comparing abr. Date Text cell to a date formatted cell David B Microsoft Excel Programming 0 24th Apr 2008 05:46 PM
Spell Checking with checking cell notes =?Utf-8?B?amZpdHpwYXQ=?= Microsoft Excel Misc 0 8th Aug 2007 10:26 PM
Put todays date in a cell by checking a box!! =?Utf-8?B?TWFydGlu?= Microsoft Excel Misc 1 24th Oct 2005 09:01 PM
Expiry Date Checking Mishap with Specific Date Regional Settings Orlin Pavlov Anti-Spyware Installation 1 18th Mar 2005 07:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:15 PM.