How to calculate Max or Min with multiple if conditions

oxygn

New Member
Joined
May 24, 2010
Messages
25
Hi All,

I am trying to figure out how to calculate max or min with multiple if conditions.

Here is sample data:
CodeProductCategoryQtyMin
11Z108
21Z9
31Z8
41Z
52D1
62D2

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>

The condition is get the minimum Qty where Product is 1 and Category is Z. The answer should be 8.

However if I use the formula =MIN(IF(AND(Products=1, C2:C7 = "Z"), Qty)) I get answer 1.

Can you please help.

Regards
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I tried =MIN(IF(AND(Products=1, C2:C7 = "Z", Qty <> ""), Qty)) and now the answer is 0
 
Upvote 0
I tried =MIN(IF(AND(Products=1, C2:C7 = "Z", Qty <> ""), Qty)) and now the answer is 0

You were almost there. Try:

=MIN(IF(Products=1,IF(C2:C7="Z",IF(D2:D7<>"",D2:D7))))

This is an array formula. So you must confirm it with Control+Shift+Enter, not just Enter.

Hope this helps
 
Upvote 0

Forum statistics

Threads
1,216,126
Messages
6,129,004
Members
449,480
Latest member
yesitisasport

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