LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date validation with abiguous format

Hi all,

I'm working on developing a date validation where the user enters into
a cell a date in the format "yyyymmdd". The validation must happen
after the entry, so I'm not able to use a simple validation function,
or even cell formatting (due to copying/pasting into the cell). The
code has to recognize that this "number" is a valid date. So far I've
defined a variable that extracts the text of this number into a more
friendly date format and then decides if it's a valid date.

Dt = Mid(C.Text, 5, 2) & "/" & Right(C.Text, 2) & "/" & Left(C.Text, 4)
If Dt.... End If

Is there an easier way to do this? Is there a function that says - if
this number in "yyyymmdd" format is a valid date, then do this... ?

Thanks,
Nate

 
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
permanent conversion of 1904 date format to 1900 date format Jos Excel Worksheet Functions 4 November 26th 15 02:48 PM
Data Validation Date Format Dana M Excel Worksheet Functions 2 February 11th 09 07:41 PM
How do I create list validation from code without the text being converted into date format? EG[_3_] Excel Programming 2 November 24th 05 10:16 AM
code to convert date from TEXT format (03-02) to DATE format (200203) Gauthier[_2_] Excel Programming 0 September 22nd 04 03:26 PM
Change a date in text format xx.xx.20xx to a recognised date format concatenator Excel Programming 1 November 24th 03 11:33 PM


All times are GMT +1. The time now is 06:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"