#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Validation Date

Hi

Is there anyway to validate a date to ensure that the date enetred in cell
B2 is a Monday?

Also how would it be coded to ensure that if a Monday was not entered then
it returned a error message.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Validation Date

I would use a combination of Formulas and Conditional formatting to do that.

Assuming your date is in Cell A1. Select A1
Format | Conditonal Formatting... | Formula is:
=WEEKDAY(A1) < 2
and select a pattern
In the adjacent cell B2 add the formula
=IF(WEEKDAY(A1) = 2, "", "Invalid Date")
--
HTH...

Jim Thomlinson


"housinglad" wrote:

Hi

Is there anyway to validate a date to ensure that the date enetred in cell
B2 is a Monday?

Also how would it be coded to ensure that if a Monday was not entered then
it returned a error message.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Validation Date

Thanks for that, but is there a way of doing it without writing the error
message in the adjacent box?



"Jim Thomlinson" wrote:

I would use a combination of Formulas and Conditional formatting to do that.

Assuming your date is in Cell A1. Select A1
Format | Conditonal Formatting... | Formula is:
=WEEKDAY(A1) < 2
and select a pattern
In the adjacent cell B2 add the formula
=IF(WEEKDAY(A1) = 2, "", "Invalid Date")
--
HTH...

Jim Thomlinson


"housinglad" wrote:

Hi

Is there anyway to validate a date to ensure that the date enetred in cell
B2 is a Monday?

Also how would it be coded to ensure that if a Monday was not entered then
it returned a error message.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Validation Date

Another way would be to use
Data | Validation | Custom with a formula of
=WEEKDAY(A1) = 2

You may want to add an input and or error message to help the user.
--
HTH...

Jim Thomlinson


"housinglad" wrote:

Thanks for that, but is there a way of doing it without writing the error
message in the adjacent box?



"Jim Thomlinson" wrote:

I would use a combination of Formulas and Conditional formatting to do that.

Assuming your date is in Cell A1. Select A1
Format | Conditonal Formatting... | Formula is:
=WEEKDAY(A1) < 2
and select a pattern
In the adjacent cell B2 add the formula
=IF(WEEKDAY(A1) = 2, "", "Invalid Date")
--
HTH...

Jim Thomlinson


"housinglad" wrote:

Hi

Is there anyway to validate a date to ensure that the date enetred in cell
B2 is a Monday?

Also how would it be coded to ensure that if a Monday was not entered then
it returned a error message.

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Validation Date

Yeh that is alot better, brillant mate, do you have msn?




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 LM Excel Worksheet Functions 8 November 1st 07 12:42 AM
Validation on date jk Excel Worksheet Functions 3 August 29th 06 01:30 AM
date validation Bri Excel Worksheet Functions 3 January 22nd 06 06:52 PM
date validation MAYBE Julian Campbell Excel Discussion (Misc queries) 1 December 28th 05 10:17 PM
Date Validation - Must equal Sundays date jeridbohmann Excel Discussion (Misc queries) 14 November 30th 05 08:40 PM


All times are GMT +1. The time now is 10:26 AM.

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"