two way index match with approximate date match

Kmitchell

Active Member
Joined
Feb 27, 2007
Messages
361
Office Version
  1. 365
Platform
  1. Windows
Having difficulty with setting up this formula to work properly. Essentially I need to match on row (Model) and approximate date.

In this example, Model A's closest date to 3/31/2023 is 3/30/2023 and the return value should be 87,800. I tried the below formula but its not working. Any suggestions are greatly appreciated.

NDEX($B$2:$K$15,MATCH($A22,IF($B$1:$K$1=B$21,$A$2:$A$15,1)))
 

Attachments

  • Capture.PNG
    Capture.PNG
    40 KB · Views: 14
Your expected results still do not match the data.
Maybe
Excel Formula:
=LET(f,CHOOSECOLS(FILTER(B2:K15,A2:A15<=A18),MATCH(B17,B1:K1,0)),FILTER(f,f<>"","no data"))
oh rather I see it's giving me the 4 values less than and equal to 3/31/2023. How do I adjust to return only the latest date on or before 3/31/2023, in the case of model C the expected result is 87,800
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,216,085
Messages
6,128,733
Members
449,465
Latest member
TAKLAM

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