Index Match with more than one criteria

prov1x212

New Member
Joined
Aug 15, 2018
Messages
11
I am trying to get excel to return a date from a list of orders from certain companies. This list has the same companies just different dates and i need excel to return the latest date.

=INDEX(Orders!B313:B419,MATCH(1,(Orders!A313:A419="*"&F3&"*")*(Orders!B313:B419>N3),1))

F3 is the name of the company and i'm using the "*" because on the orders page it has more information in the line. This may be an incorrect way to do it but I've used it in the past.
N3 is the 2nd to last order and i'm looking to find the last order. I did press CTL Shift Enter when i tried this.

Any help would be great. Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Try this array formula:

Code:
[TABLE="width: 746"]
<colgroup><col width="746"></colgroup>[TR]
   [TD="width: 746"]INDEX(Orders!B313:B419,MATCH(1,(ISNUMBER(SEARCH(F3,Orders!A313:A419)))*(Orders!B313:B419>N3),0))[/TD]
 [/TR]
[/TABLE]

If you just need the latest date based on a company take a look at the MAXIFS function if you have Excel 2016 (see cell E3 below) or an array formula with MAX function see cell E5) in the example below.
Excel Workbook
ABCDE
1CompanyDate
2Comp1 T24/5/2018CompanyLast Order
3Comp243258Comp16/8/2018
4Comp1 T22/1/2018
5Comp1 T26/8/20186/8/2018
6Comp29/12/2018
7Comp63/5/2018
8Comp1 T25/9/2018
9Comp27/12/2018
10Comp98/30/2018
Sheet
 
Upvote 0
Awesome thanks! I was able to find the second to last by just adding a second criteria less than the first.
 
Upvote 0
How about finding the related shipping amount. Again i tried to use Index with match and an array but that doesn't ever seem to go well for me.
 
Upvote 0
Reference the Shipping Amount range in the INDEX instead of the date.

Code:
INDEX(Orders![COLOR=#ff0000]Ship Amount Range Here[/COLOR],MATCH(1,(ISNUMBER(SEARCH(F3,Orders!A313:A419)))*(Orders!B313:B419>N3),0))
Excel Workbook
ABCDEFGHMN
1
2CompanyShip$Date
3Comp1$80.005/9/2018
4
5
6
311
312CompanyDateShip$
313Comp1 T24/5/2018$79.00
314Comp26/7/2018$42.00
315Comp1 T22/1/2018$77.00
316Comp1 T26/8/2018$80.00
317Comp29/12/2018$62.00
318Comp63/5/2018$65.00
319Comp1 T25/9/2018$42.00
320Comp27/12/2018$47.00
321Comp98/30/2018$76.00
Sheet
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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