# Index-match return exact match, if not closest match

#### ALVG2019

##### New Member
I have this formula : INDEX(A2:A20,MATCH(1,(F10=C2:C20)*(F11=B2:B20),0)
It returns the exact match. I need the formula to return the closest match if the there's no exact match

this is my data : A2:A20
I need to find the PO that is closest to the date 19-03-17 , the result should be : P91180

 P/O Required Product SORT BY PO P90749 19-03-08 2241773 P90749 19-03-08 2241773 P90750 19-05-01 2241773 P90757 19-03-31 1132113 P90757 19-03-31 1132114 1145879 P91179 19-03-11 1145879 19-03-17 P91180 19-03-15 1145879 #N/A Closest Match , SHOULD BE P91180 P91181 19-04-02 1145879 INDEX(A2:A20,MATCH(1,1*(E6=C2:C20)*(E7=B2:B20)*(MIN(IF(B2:B20>E7,B2:B20))),0)) P91182 19-05-01 1145879 1145879 P91183 19-06-01 1145879 19-05-01 P91199 19-05-15 1120975 P91182 Exact Match P91217 19-03-20 1130397 INDEX(A2:A20,MATCH(1,(F10=C2:C20)*(F11=B2:B20),0) P91261 19-03-08 1120976 P91390 19-03-30 1130397 P91427 19-03-27 1124940 P91491 19-03-01 1140773 P91572 19-03-23 1130882 P91614 19-03-27 8229026 P91615 19-05-01 8229026

<colgroup><col span="2"><col><col><col><col><col span="3"></colgroup><tbody>
</tbody>

### 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.
Maybe this array formula that must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
ABCDEF
1P/ORequiredProductDatePO
2P907493/8/201922417733/17/2019P91180
3P907493/8/20192241773
4P907505/1/20192241773
5P907573/31/20191132113
6P907573/31/20191132114
7P911793/11/20191145879
8P911803/15/20191145879
9P911814/2/20191145879
10P911825/1/20191145879
11P911836/1/20191145879
12P911995/15/20191120975
13P912173/20/20191130397
14P912613/8/20191120976
15P913903/30/20191130397
16P914273/27/20191124940
17P914913/1/20191140773
18P915723/23/20191130882
19P916143/27/20198229026
20P916155/1/20198229026
Sheet

Replies
1
Views
202
Replies
4
Views
254
Replies
1
Views
172
Replies
13
Views
516
Replies
8
Views
401

1,207,111
Messages
6,076,620
Members
446,216
Latest member
BEEALTAIR

### 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.

### Which adblocker are you using?

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

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