ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Check if a date comes before/after a range of dates (https://www.excelbanter.com/excel-discussion-misc-queries/446713-check-if-date-comes-before-after-range-dates.html)

Jay07

Check if a date comes before/after a range of dates
 
Hi all,

If I have two sheets both with a column of dates included... Is it possible to look up a date in say, 'Sheet B' against the whole column of dates in 'Sheet A' and return a simple yes/no if the date in 'Sheet B' comes before any other date in the 'Sheet A' column of dates?

i.e...

'SHEET A'

A B
1 18/01/2012
2 14/05/2010
3 12/10/2011
4 22/03/2012
5 04/02/2009

'SHEET B'

A B
1 16/11/2012 No
2 07/12/2010 No
3 26/01/2008 Yes
4 09/08/2012 No
5 30/06/2008 Yes

B3 & B5 will then say 'Yes' as both of dates in cells A3 & A5 are before any date in the whole column of 'Sheet A.'

Hope that makes sense.

Thank you in advance,

Jay

ChooseParkay

Quote:

Originally Posted by Jay07 (Post 1604167)
Hi all,

If I have two sheets both with a column of dates included... Is it possible to look up a date in say, 'Sheet B' against the whole column of dates in 'Sheet A' and return a simple yes/no if the date in 'Sheet B' comes before any other date in the 'Sheet A' column of dates?

i.e...

'SHEET A'

A B
1 18/01/2012
2 14/05/2010
3 12/10/2011
4 22/03/2012
5 04/02/2009

'SHEET B'

A B
1 16/11/2012 No
2 07/12/2010 No
3 26/01/2008 Yes
4 09/08/2012 No
5 30/06/2008 Yes

B3 & B5 will then say 'Yes' as both of dates in cells A3 & A5 are before any date in the whole column of 'Sheet A.'

Hope that makes sense.

Thank you in advance,

Jay

I believe this can be solved with a =vlookup

Spencer101

1 Attachment(s)
Quote:

Originally Posted by ChooseParkay (Post 1604174)
I believe this can be solved with a =vlookup

Is this what you mean?
Not done with a VLOOKUP but rather an array IF formula.

Jay07

Quote:

Originally Posted by Spencer101 (Post 1604176)
Is this what you mean?
Not done with a VLOOKUP but rather an array IF formula.

Brilliant! Thanks Spencer. Works like a good'un.


All times are GMT +1. The time now is 10:51 PM.

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