Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default entry must match value in range

I have a range of cells with dates like: 1/1; 1/15; 1/31; 2/1; 2/15; 2/28...

To the left of the range a user will enter a date. I want to make sure that
the date matches a value in the range above. For example, 1/7 is invalid
whereas 2/1 is fine. I'd prefer not to use a dropdown. This hasn't been easy
for me to figure out and I'm hoping someone can help me instert the correct
validate formula.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default entry must match value in range

Data Validation Custom Formula:

=COUNTIF(B1:IV1,A1)0
--
Gary''s Student - gsnu200788
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default entry must match value in range

Is the column you are filling in formatted as Date with a display format of
m/d? If so, you can delete your range of approved dates and use this
Validation formula...

=OR(DAY(A1)=1,DAY(A1)=15,DAY(A1)=DAY(DATE(YEAR(A1) ,MONTH(A1)+1,0)))

Note: This formula will use February 29th (instead of the 28th) as the valid
end of February date in a leap year (such as this year).

Rick


"JayBro" wrote in message
...
I have a range of cells with dates like: 1/1; 1/15; 1/31; 2/1; 2/15;
2/28...

To the left of the range a user will enter a date. I want to make sure
that
the date matches a value in the range above. For example, 1/7 is invalid
whereas 2/1 is fine. I'd prefer not to use a dropdown. This hasn't been
easy
for me to figure out and I'm hoping someone can help me instert the
correct
validate formula.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default entry must match value in range

I'm still not able to make it work. I'm using Excel 2007. Under Data | Data
Validation I'm usign the criteria "Date, "equal to" and entering Rick's
formula. The result is that nothing appears to be valid. I tried the COUNTIF
suggestion too matching to a series of existing dates but get the same
behavior. Can someone steer me in the right direction? Maybe it's back to the
drawing board on Data Validation, I don't know.



"Rick Rothstein (MVP - VB)" wrote:

Is the column you are filling in formatted as Date with a display format of
m/d? If so, you can delete your range of approved dates and use this
Validation formula...

=OR(DAY(A1)=1,DAY(A1)=15,DAY(A1)=DAY(DATE(YEAR(A1) ,MONTH(A1)+1,0)))

Note: This formula will use February 29th (instead of the 28th) as the valid
end of February date in a leap year (such as this year).

Rick


"JayBro" wrote in message
...
I have a range of cells with dates like: 1/1; 1/15; 1/31; 2/1; 2/15;
2/28...

To the left of the range a user will enter a date. I want to make sure
that
the date matches a value in the range above. For example, 1/7 is invalid
whereas 2/1 is fine. I'd prefer not to use a dropdown. This hasn't been
easy
for me to figure out and I'm hoping someone can help me instert the
correct
validate formula.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default entry must match value in range

The result from my formula is not a date (it produces a logical TRUE or
FALSE result), so you can't validate it as one. Instead of Date, select
Custom from the Validation Criteria's Allow drop-down field and then put my
formula in the Formula field.

Rick


"JayBro" wrote in message
...
I'm still not able to make it work. I'm using Excel 2007. Under Data |
Data
Validation I'm usign the criteria "Date, "equal to" and entering Rick's
formula. The result is that nothing appears to be valid. I tried the
COUNTIF
suggestion too matching to a series of existing dates but get the same
behavior. Can someone steer me in the right direction? Maybe it's back to
the
drawing board on Data Validation, I don't know.



"Rick Rothstein (MVP - VB)" wrote:

Is the column you are filling in formatted as Date with a display format
of
m/d? If so, you can delete your range of approved dates and use this
Validation formula...

=OR(DAY(A1)=1,DAY(A1)=15,DAY(A1)=DAY(DATE(YEAR(A1) ,MONTH(A1)+1,0)))

Note: This formula will use February 29th (instead of the 28th) as the
valid
end of February date in a leap year (such as this year).

Rick


"JayBro" wrote in message
...
I have a range of cells with dates like: 1/1; 1/15; 1/31; 2/1; 2/15;
2/28...

To the left of the range a user will enter a date. I want to make sure
that
the date matches a value in the range above. For example, 1/7 is
invalid
whereas 2/1 is fine. I'd prefer not to use a dropdown. This hasn't been
easy
for me to figure out and I'm hoping someone can help me instert the
correct
validate formula.






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default entry must match value in range

Success! Thank you, Rick.

"Rick Rothstein (MVP - VB)" wrote:

The result from my formula is not a date (it produces a logical TRUE or
FALSE result), so you can't validate it as one. Instead of Date, select
Custom from the Validation Criteria's Allow drop-down field and then put my
formula in the Formula field.

Rick


"JayBro" wrote in message
...
I'm still not able to make it work. I'm using Excel 2007. Under Data |
Data
Validation I'm usign the criteria "Date, "equal to" and entering Rick's
formula. The result is that nothing appears to be valid. I tried the
COUNTIF
suggestion too matching to a series of existing dates but get the same
behavior. Can someone steer me in the right direction? Maybe it's back to
the
drawing board on Data Validation, I don't know.



"Rick Rothstein (MVP - VB)" wrote:

Is the column you are filling in formatted as Date with a display format
of
m/d? If so, you can delete your range of approved dates and use this
Validation formula...

=OR(DAY(A1)=1,DAY(A1)=15,DAY(A1)=DAY(DATE(YEAR(A1) ,MONTH(A1)+1,0)))

Note: This formula will use February 29th (instead of the 28th) as the
valid
end of February date in a leap year (such as this year).

Rick


"JayBro" wrote in message
...
I have a range of cells with dates like: 1/1; 1/15; 1/31; 2/1; 2/15;
2/28...

To the left of the range a user will enter a date. I want to make sure
that
the date matches a value in the range above. For example, 1/7 is
invalid
whereas 2/1 is fine. I'd prefer not to use a dropdown. This hasn't been
easy
for me to figure out and I'm hoping someone can help me instert the
correct
validate formula.




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
Find closest text match for each unique entry in a list Nathan_Decker Excel Discussion (Misc queries) 2 September 23rd 07 01:36 AM
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
Highlight a range for data entry Kirk P. Excel Discussion (Misc queries) 2 August 28th 06 03:09 PM
How do I set up Data entry to match My Application Form Mr. Ziggy Excel Discussion (Misc queries) 10 April 6th 06 06:46 PM
Allowing only one entry in a range McKenna New Users to Excel 7 March 11th 05 04:56 PM


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