Regarding the following question and answer from a previous thread:
Question: I have 2 columns, one has couple dates such as 2/15/2006, 5/10/2006, 5/15/2006, 5/20/2006, 8/15/2006, and 10/15/2006, the other one has a value of 6/15/2006. I want to find the closest date before 6/15/2006. Could you please help me out with this problem?
"iliace" responded:
If the column of dates is always in ascending order (later dates at the bottom), you can use the MATCH() function. Let's say 6/15/2006 is in A1, and the other dates are in B1:B10.
=INDEX($B$1:$B$10, MATCH(A1, $B$1:$B$10, 1))
Will return the closest date before the date in A1.
My Question: How do I get the closest date after the date in A1?
Question: I have 2 columns, one has couple dates such as 2/15/2006, 5/10/2006, 5/15/2006, 5/20/2006, 8/15/2006, and 10/15/2006, the other one has a value of 6/15/2006. I want to find the closest date before 6/15/2006. Could you please help me out with this problem?
"iliace" responded:
If the column of dates is always in ascending order (later dates at the bottom), you can use the MATCH() function. Let's say 6/15/2006 is in A1, and the other dates are in B1:B10.
=INDEX($B$1:$B$10, MATCH(A1, $B$1:$B$10, 1))
Will return the closest date before the date in A1.
My Question: How do I get the closest date after the date in A1?