I have a table that looks like the one below with the dates sorted in descending order.
[table="width: 500"]
[tr]
[td]Person[/td]
[td]Date[/td]
[td]Number[/td]
[/tr]
[tr]
[td]Jose[/td]
[td]1/1/2014[/td]
[td]98[/td]
[/tr]
[tr]
[td]Rosa[/td]
[td]5/14/14[/td]
[td]47[/td]
[/tr]
[tr]
[td]Jose[/td]
[td]6/1/14[/td]
[td]3[/td]
[/tr]
[tr]
[td]Rosa[/td]
[td]2/1/15[/td]
[td]456[/td]
[/tr]
[tr]
[td]Jose[/td]
[td]12/5/15[/td]
[td]3[/td]
[/tr]
[tr]
[td]Rosa[/td]
[td]5/2/16[/td]
[td]-10[/td]
[/tr]
[/table]
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!
[table="width: 500"]
[tr]
[td]Person[/td]
[td]Date[/td]
[td]Number[/td]
[/tr]
[tr]
[td]Jose[/td]
[td]1/1/2014[/td]
[td]98[/td]
[/tr]
[tr]
[td]Rosa[/td]
[td]5/14/14[/td]
[td]47[/td]
[/tr]
[tr]
[td]Jose[/td]
[td]6/1/14[/td]
[td]3[/td]
[/tr]
[tr]
[td]Rosa[/td]
[td]2/1/15[/td]
[td]456[/td]
[/tr]
[tr]
[td]Jose[/td]
[td]12/5/15[/td]
[td]3[/td]
[/tr]
[tr]
[td]Rosa[/td]
[td]5/2/16[/td]
[td]-10[/td]
[/tr]
[/table]
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!