MAXIF?

L

Lady Excel

Hello,

I want to find the max of a range of cells in one column that has many cells
with #N/A. I have noticed that I can find the average of the range by typing

=AVERAGEIF(B2:B109,">0")

and now I want to find the MAX as well, but there is no MAXIF() formula.
 
C

Chip Pearson

Use the following array formula:

=MAX(IF(NOT(ISERROR(A1:A10)),A1:A10,0))

Change the A1:A10 to the appropriate range.

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 it later. If you do this properly,
Excel will display the formula in the Formula Bar enclosed
in curly braces { }. (You do not type the curly braces -
Excel includes them automatically.) The formula will
not work properly if you do not use CTRL SHIFT ENTER. See
http://www.cpearson.com/excel/ArrayFormulas.aspx for lots
more information about array formulas.

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

T. Valko

Here's another one...

Array entered** :

=MAX(IF(ISNUMBER(B2:B109),B2:B109))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.
 
D

Dave Peterson

Another based on Biff's suggestion:

=IF(COUNT(B2:B109)=0,"No numbers",MAX(IF(ISNUMBER(B2:B109),B2:B109)))

(Still array entered)
 

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