Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Data Validation - 1st or 16th of the month only

In a certain cell the user enters a date. I would like data validation to
accept the entry only if the day is the 1st or 16th of the month. How do I
do that?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 806
Default Data Validation - 1st or 16th of the month only

(DAY(A1)=1)+(DAY(A1)=16)

or

OR(DAY(A1)=1),DAY(A1)=16)
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Data Validation - 1st or 16th of the month only

Use Formula is:

=OR((DAY(F1)=1),(DAY(F1)=16))

for the validation rule in F1
--
Gary''s Student - gsnu200841


"John" wrote:

In a certain cell the user enters a date. I would like data validation to
accept the entry only if the day is the 1st or 16th of the month. How do I
do that?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Data Validation - 1st or 16th of the month only

Select the range of cells to be impacted

Example with A2:A10...with A2 as the active cell
From the Excel Main Menu:
<data<validation
Settings Tab:
....Allow: Custom
....Formula: =AND(A230000,OR(DAY(A2)=1,DAY(A2)=16))
Error Alert Tab:
....Title: Invalid Entry
....Error message: Date must be the 1st or 16th of the month.
Click: OK

Note: I only used 30000 since most recent
dates are larger than 30000
(which happens to be 18-Feb-1982)

Does that help?

Regards,

Ron Coderre
Microsoft MVP (Excel)

"John" wrote in message
...
In a certain cell the user enters a date. I would like data validation to
accept the entry only if the day is the 1st or 16th of the month. How do I
do that?

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
Why does excel replace my 16th number with a zero? DebR Excel Discussion (Misc queries) 1 May 14th 09 05:34 AM
Data Validation for end of Month Casey Excel Discussion (Misc queries) 5 February 9th 06 11:59 AM
16th digit in the cell changes to a zero?? [email protected] Excel Discussion (Misc queries) 2 June 2nd 05 01:46 PM
16th digit changes?? Problem,16th digit changes to a zero.... [email protected] Excel Worksheet Functions 2 June 2nd 05 08:48 AM
Scroll to Current Month on Combo box using Data Validation JMay Excel Programming 8 May 30th 04 05:46 PM


All times are GMT +1. The time now is 04:49 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"