Hi all,

I'm looking for assistance working out a formula that will give me a value based on looking up the last date entry equal to or before a date the user will put in. Looking at the below, if the user


Example: User enters 02/01/2017 and result should be 4. If user enters 10/01/2017 result is 7. But if user enters 12/01/2017, it knows the last date closest to 12/01/2017 is 10/01/2017 and the answer is 7.
A B
01/01/2017 1
02/01/2017 2
02/01/2017 3
02/01/2017 4
05/01/2017 5
06/01/2017 6
10/01/2017 7

Hope that makes sense.

Thanks,
NigueS