Extract list using minimum as criteria

pto160

Active Member
Joined
Feb 1, 2009
Messages
478
Office Version
  1. 365
Platform
  1. Windows
I have 3 columns- the order number, receipt number and product. I am trying to get the product list based on the order number and minimum of the receipt number. In this case the order number I want is 20000 and the minimum of the receipt number is 100, so the product is dog and cat.
Is there a way to do this?
I have Excel 365.
Book1
ABC
1OrderReceiptProduct
220000200dog
320000200cat
420000200house
520000100dog
620000100cat
730000300table
830000300chair
9
10
11Result I would LikeCriteria: is Order 20000 and the mininum of the receipt number which is 100
12Dog
13Cat
Sheet1
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Try this formula:
Excel Formula:
=FILTER(C2:C8,(A2:A8=20000)*(B2:B8=MIN(B2:B8)))
 
Upvote 0
I suspect you want the minimum receipt number for that order, so try a small change to Joe's formula:

Excel Formula:
=FILTER(C2:C8,(A2:A8=20000)*(B2:B8=MINIFS(B2:B8,A2:A8,20000)))
 
Upvote 0
Solution
I suspect you want the minimum receipt number for that order, so try a small change to Joe's formula:

Excel Formula:
=FILTER(C2:C8,(A2:A8=20000)*(B2:B8=MINIFS(B2:B8,A2:A8,20000)))
Oh! Good point Rory!

It worked out for the particular example because the minimum value just happens to be with the column A values they are looking for, but that may not always be the case!
 
Upvote 0
Yes, my apologies, Yes, I wanted the minimum receipt number for that order.
Thank you so much to everyone. The solutions work great. :) (y)
 
Upvote 0
Yes, my apologies, Yes, I wanted the minimum receipt number for that order.
Thank you so much to everyone. The solutions work great. :) (y)
I know what you meant, the formula I created just didn't quite do all of that, so would work in some instances but not all.
Luckily, Rory was able to add the missing piece!
 
Upvote 0
You are welcome.
Glad we were able to help.
It was truly a team effort!
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

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