Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default Date Validation

Please I have thousands of rows across multiple columns. I need to validate
date in m/d/yyyy format. Coding will really help me as I use some formula
that does not help across multiple date. If possible to color any date not in
the m/d/yyyy format.

Sometimes I get error like d/m/yyyy or m/d//yyyy or d//m/yy or sept 2000.
Please help me be able to identify these date problem. Its really making me
get so many error files.

Thanks a big bunch!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Date Validation

I'd do it this way:
1) start macro recording
2) got to format | conditional formating and enter
- cellvalue not between 1.1.1950 and 1.1.2000, colour red -- ok
3) stop macro editor und check the produced code - in my case:

Sub Makro1()
'
' Makro1 Makro
' Makro am 17.06.2008 von Franz Erhart aufgezeichnet
'

'
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue,
Operator:=xlNotBetween, _
Formula1:="18264", Formula2:="36526"
Selection.FormatConditions(1).Font.ColorIndex = 3
End Sub

4) adapt und use this piece of code in your program as needed

regards
franz erhart.



"Yossy" wrote:

Please I have thousands of rows across multiple columns. I need to validate
date in m/d/yyyy format. Coding will really help me as I use some formula
that does not help across multiple date. If possible to color any date not in
the m/d/yyyy format.

Sometimes I get error like d/m/yyyy or m/d//yyyy or d//m/yy or sept 2000.
Please help me be able to identify these date problem. Its really making me
get so many error files.

Thanks a big bunch!!

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
Date Validation for Date of Birth Stitch45 Excel Programming 2 March 5th 06 10:58 AM
Date Validation - Must equal Sundays date jeridbohmann Excel Discussion (Misc queries) 14 November 30th 05 08:40 PM
Date validation patam Excel Discussion (Misc queries) 8 September 3rd 05 05:26 PM
Date Colum Date Formatting & Validation Mike[_81_] Excel Programming 1 June 7th 04 01:59 AM
date validation Jo[_4_] Excel Programming 1 October 20th 03 08:50 PM


All times are GMT +1. The time now is 11:32 PM.

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"