Conditional Max

RicardoB

New Member
Joined
Mar 20, 2002
Messages
37
I have 2 columns: A with value and B with text. I need to have the maximum value based on one condition (that meets the column B). In other words, it is similar to SUMIF, but it would be a MAXIF (unfortunately, I didn´t find this function).
It would be great to have a max based on two conditions too....
Regards,
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
On 2002-03-21 10:41, RicardoB wrote:
I have 2 columns: A with value and B with text. I need to have the maximum value based on one condition (that meets the column B). In other words, it is similar to SUMIF, but it would be a MAXIF (unfortunately, I didn´t find this function).
It would be great to have a max based on two conditions too....
Regards,

What is the condition?
 
Upvote 0
OK.

Consider

{2,"a";3,"a";2,"b";6,"a";8,"b";9,"b";3,"c"}

in A2:B8.

=SUMPRODUCT(MAX((B2:B8="a")*(A2:A8)))

will give you the MAX of the values that are associated with an "a" in B2:B8.
 
Upvote 0
On 2002-03-21 10:51, Aladin Akyurek wrote:
OK.

Consider

{2,"a";3,"a";2,"b";6,"a";8,"b";9,"b";3,"c"}

in A2:B8.

=SUMPRODUCT(MAX((B2:B8="a")*(A2:A8)))

will give you the MAX of the values that are associated with an "a" in B2:B8.

Great!! Thank you very much, Aladin!!
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,618
Members
449,092
Latest member
amyap

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