Lookup and return the value based on the combination that has the closest date to today's date

Pupishi

New Member
Joined
Oct 27, 2020
Messages
13
Office Version
  1. 2016
Platform
  1. Windows
Dear Experts of Excel,

I would like to know if there is a formula that can accomplish the below (without using VBA).
Please find below an example in which I would like to know where A's current country is based on today's date.

If today's date is, say, May 14th, the field should populate USA; however, if based on tomorrow (i.e., May 15th), it should show France.
If I were to check it on May 23rd, it should show Korea.

Understand perhaps I could use index match with ABS and MIN, but because I want to specifically look for Type A, I am not sure how to achieve this.
Any kind of advice or support would be highly appreciated!

Thank you.

1715934206051.png
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Dear Experts of Excel,

I would like to know if there is a formula that can accomplish the below (without using VBA).
Please find below an example in which I would like to know where A's current country is based on today's date.

If today's date is, say, May 14th, the field should populate USA; however, if based on tomorrow (i.e., May 15th), it should show France.
If I were to check it on May 23rd, it should show Korea.

Understand perhaps I could use index match with ABS and MIN, but because I want to specifically look for Type A, I am not sure how to achieve this.
Any kind of advice or support would be highly appreciated!

Thank you.

View attachment 111555
TRY:
Excel Formula:
F2=INDEX($A$2:$A$10,MATCH(MIN(ABS($B$2:$B$10-TODAY())),ABS($B$2:$B$10-TODAY()),0))
Excel Formula:
G2=INDEX(C2:C10,MATCH(MIN(ABS($B$2:$B$10-TODAY())),ABS($B$2:$B$10-TODAY()),0))
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top