The IF function

C

Chip Pearson

Emma,

You don't need an IF function. Instead, use the MAX function.
E.g.,

=MAX(A1:A19)

will return the largest value in cells A1:A19.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
E

Emma

I'm currently doing a course and it is in one of the exercises, and it
states that i have to use IF
 
E

Emma

Chip,
Is it not possible to use the IF function, it's just that I am currently
studying for a microsoft office certification and one of the exercises is to
use the IF function in order to do it?
 
M

Michael

Hi Emma
The other guys have given you the simplest and neatest answer.
However, knowing some tutors, they throw in a question to see if you can
think around it.

Try this

=IF(A1:A19="","",MAX(A1:A19))

HTH
Michael Mitchelson
 
H

Henry

Emma,

How about
=IF(MAX(A1:A10)>MAX(A11:A19),MAX(A1:A10),MAX(A11:A19))

It uses an IF function, but I don't think it's the answer the questioner is
looking for :)

Henry
 
S

Sandy Mann

=IF(A1:A19="","",MAX(A1:A19))

Returns #VALUE! for me becuse the array A1:A19 cannot resolve to TRUE/FALSE

=IF(COUNT(A1:A19)=0,"",MAX(A1:A19))

would do what you are suggesting


HTH

Sandy
[email protected]
Replace@mailinator with @tiscali.co.uk
 
T

TommySzalapski

Um, shouldn't you just ask whomever is in charge of your certification?
It sounds like you are trying to get test answers.

Szalapsk
 
J

joeu2004

Emma,

I understand that if the assignment asks you to use IF(),
you "must" use IF(), even though MAX() seems to be the
better choice. You might want to ask your instructor
(if you have one) what they are looking for and why.
However, knowing some tutors, they throw in a question
to see if you can think around it. Try this
=IF(A1:A19="","",MAX(A1:A19))

Dovetailing what Michael said, perhaps the following is
something like what the assignment is looking for:

=IF(NOT(ISNUMBER(A1:A19)),"",MAX(A1:A19))

The point is: create a formula that will display the
max without ever incurring an error. It's called
"bullet-proofing", and it is certainly a useful ability
for a professional to learn.
 
E

Emma

Thank you all for your help. I'm glad i found this site now.
Will give your solutions a try in the morning.
Thanks Again. :)
 
Top