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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
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,216,741
Messages
6,132,450
Members
449,729
Latest member
davelevnt

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