Index/Match with multiple criteria, but one is exact and other is largest without going over

mst3k4L

Board Regular
Joined
Nov 3, 2011
Messages
55
I have a table that looks like the one below with the dates sorted in descending order.

PersonDateNumber
Jose1/1/201498
Rosa5/14/1447
Jose6/1/143
Rosa2/1/15456
Jose12/5/153
Rosa5/2/16-10


I want to enter a name and date and have excel search the table for the exact name and the closest date without going over, and then provide the answer in the "Number" column. For example, entering "Rosa" and "6/2/14" will result in "47", while "Jose" and "6/2/14" will be "3".

I'm assuming it's some combination of Index & Match. Feel free to use something else, but please void VBA if possible. I can resort the table as needed. Thanks in advance!
 
This actually works!
Good "starting" point ;)
Well, not sure at all it grabs the 1st... Take the same example with Jose and 1/1/16 and before validating change the value of 3 for i.e 100 on the line where Jose has date 12/5/15. What does the formula return?
 
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.
Good "starting" point ;)
Well, not sure at all it grabs the 1st... Take the same example with Jose and 1/1/16 and before validating change the value of 3 for i.e 100 on the line where Jose has date 12/5/15. What does the formula return?
It's working now, but I'm not sure what I did differently. Thanks for the help!
 
Upvote 0

Forum statistics

Threads
1,222,091
Messages
6,163,856
Members
451,861
Latest member
Lurch65

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