Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
i want to validate the date entered as a Sunday - if the user enters a date
that is not a Sunday, the user cannot continue. cell A1 - user enters the date (the cell is formatted as custom yyyy-mm-dd) cell A2 - text(a1,"dddd") returns back the day of the week is there a way to validate the value as a Sunday date. jat |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Select cell A1
Goto the menu DataValidation Allow: Custom Formula: =WEEKDAY(A1)=1 You can use custom input or error alert messages if you want. OK out -- Biff Microsoft Excel MVP "jatman" wrote in message ... i want to validate the date entered as a Sunday - if the user enters a date that is not a Sunday, the user cannot continue. cell A1 - user enters the date (the cell is formatted as custom yyyy-mm-dd) cell A2 - text(a1,"dddd") returns back the day of the week is there a way to validate the value as a Sunday date. jat |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Not sure how you want to do the validation, but this will return TRUE if the
date in A1 is a Sunday and FALSE otherwise... =WEEKDAY(A1)=1 So, you could do some variation on this for your validation formula... =IF(WEEKDAY(A1)=1,"That date is a Sunday","Sorry, it's not a Sunday") -- Rick (MVP - Excel) "jatman" wrote in message ... i want to validate the date entered as a Sunday - if the user enters a date that is not a Sunday, the user cannot continue. cell A1 - user enters the date (the cell is formatted as custom yyyy-mm-dd) cell A2 - text(a1,"dddd") returns back the day of the week is there a way to validate the value as a Sunday date. jat |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Add Data Validation to A1. Select Data (ribbon tab in XL2007 or menu bar in
earlier versions) Data Validation set Allow to Custom for Formula enter =WEEKDAY(A1)=1) on the Error Alert tab, set the message to display if a non-Sunday date is entered OK. Hope this helps, Hutch "jatman" wrote: i want to validate the date entered as a Sunday - if the user enters a date that is not a Sunday, the user cannot continue. cell A1 - user enters the date (the cell is formatted as custom yyyy-mm-dd) cell A2 - text(a1,"dddd") returns back the day of the week is there a way to validate the value as a Sunday date. jat |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Validate date entry in a text box. | Excel Discussion (Misc queries) | |||
validate alternate day date | Excel Discussion (Misc queries) | |||
validate a date range | Excel Discussion (Misc queries) | |||
Get Day from Date to Validate | Excel Discussion (Misc queries) | |||
How can i use a command button to validate date and time | Excel Discussion (Misc queries) |