ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to valid the date with given condition? (https://www.excelbanter.com/excel-discussion-misc-queries/154563-how-valid-date-given-condition.html)

Eric

How to valid the date with given condition?
 
Does anyone have any suggestions on how to valid the date with given condition?
For example, there is a list of date under column A,
01-May-06
06-May-06
11-May-06
13-May-06
25-May-06
....
There is a given date in cell B1 [20-May-07] and a given number 6 in cell B2.

I would like to determine any date under column A within the range based on
the given date [20-May-07] + / - the given number 6 days, which is between
[14-May-06] and [26-May-06]. If none exists within this range, then return
FALSE in cell C1, else if any date or more exist within this range, then
return TRUE in cell C1.
Does anyone have any suggestions on how to do it?
Thanks in advance for any suggestions
Eric

T. Valko

How to valid the date with given condition?
 
Try this:

the given date [20-May-07] + / - the given number 6 days, which is between
[14-May-06] and [26-May-06].


I think your years are messed up!

=COUNTIF(A1:A5,"="&B1-B2)-COUNTIF(A1:A5,""&B1+B2)0

--
Biff
Microsoft Excel MVP


"Eric" wrote in message
...
Does anyone have any suggestions on how to valid the date with given
condition?
For example, there is a list of date under column A,
01-May-06
06-May-06
11-May-06
13-May-06
25-May-06
...
There is a given date in cell B1 [20-May-07] and a given number 6 in cell
B2.

I would like to determine any date under column A within the range based
on
the given date [20-May-07] + / - the given number 6 days, which is between
[14-May-06] and [26-May-06]. If none exists within this range, then return
FALSE in cell C1, else if any date or more exist within this range, then
return TRUE in cell C1.
Does anyone have any suggestions on how to do it?
Thanks in advance for any suggestions
Eric





All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com