Min/max with criteria

syban

New Member
Joined
Mar 7, 2016
Messages
8
Hello, I am using an averageif to calculate the average of the prices that a company bought boxes of aluminium. I am using the following function and excel calculates the average price of aluminium buys only (the data is in different page and the function is on another sheet called results)
=AVERAGEIF('SHEET A'!F2:F14;"ALUMINIUM";'SHEET A'!K2:K14)

I am having problem with doing the same thing with min and max function. I want excel to find the minimum and maximum price of aluminium buys only.

I would appreciate the help because this is for my work.

Sincerely yours
Syban
 

Some videos you may like

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
4,413
Office Version
  1. 365
Platform
  1. MacOS
=MIN(IF(('SHEET A'!$F$2:$F$14="ALUMINIUM")*('SHEET A'!$K$2:$K$14<>""),'SHEET A'!$K$2:$K$14))
use control shift enter to get an Array
{=MIN(IF(('SHEET A'!$F$2:$F$14="ALUMINIUM")*('SHEET A'!$K$2:$K$14<>""),'SHEET A'!$K$2:$K$14))}

for MAX
{=MAX(IF(('SHEET A'!$F$2:$F$14="ALUMINIUM"),'SHEET A'!$K$2:$K$14))}
 

syban

New Member
Joined
Mar 7, 2016
Messages
8
=MIN(IF(('SHEET A'!$F$2:$F$14="ALUMINIUM")*('SHEET A'!$K$2:$K$14<>""),'SHEET A'!$K$2:$K$14))
use control shift enter to get an Array
{=MIN(IF(('SHEET A'!$F$2:$F$14="ALUMINIUM")*('SHEET A'!$K$2:$K$14<>""),'SHEET A'!$K$2:$K$14))}

for MAX
{=MAX(IF(('SHEET A'!$F$2:$F$14="ALUMINIUM"),'SHEET A'!$K$2:$K$14))}

Thank you very much etaf! lifesaver...!Very helpful!!!!
 

syban

New Member
Joined
Mar 7, 2016
Messages
8
Oops sorry mate....I just noticed that this calculates the min and max of the entire column....not only by the ones belonging to Aluminium buys.... :(
 

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
4,413
Office Version
  1. 365
Platform
  1. MacOS
Your are welcome
 

Watch MrExcel Video

Forum statistics

Threads
1,123,139
Messages
5,599,950
Members
414,350
Latest member
ajesh27

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
Top