maxif

R

RobFJ

I want to report the maximum number in column A, providing a condition in
column B is satisfied. All data in rows A and B are integers..

eg Max for 37 in the following table would be 65

Col A Col B

23 37
122 32
65 37


Can SKS help with the syntax

TIA

Rob
 
D

Don Guillett

This is an array formula that must be entered using ctrl+shift+enter
=MAX(IF(J2:J22=37,I2:I22))
 
A

Ashish Mathur

Hi,

Try this =max(if((rangeB=37),rangeA))

Alternatively, you may also read up on the DMAX() formula in Excel's Help
menu

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 
C

Chip Pearson

You can use a formula like the following array formula.

=MAX(IF(B1:B7="a",A1:A7,MIN(A1:A7)))

This will return the maximum value from A1:A7 where the corresponding
value in B1:B7 is an "a". Since this is an array formula, you *must*
press CTRL SHIFT ENTER rather than just ENTER when you first enter the
formula and whenever you edit later. If you do this properly, Excel
will display the formula enclosed in curly braces { }. For lots more
information about array formulas, see
http://www.cpearson.com/Excel/ArrayFormulas.aspx

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top