If to determine lessor of three values

J

Jo-Anne

I am trying to build an IF statement that will return the lessor of three
values and although I think this should be easy, it's not working.

So my values are:
H42 = 500
G44 = 400
G45 = 425

Here's my statement that's not working...
=IF(AND(H42<G44,H42<G45),IF(G44<G45,G44),H42)

thanks in advance
 
H

Harlan Grove

Jo-Anne said:
I am trying to build an IF statement that will return the lessor of three
values and although I think this should be easy, it's not working.

So my values are:
H42 = 500
G44 = 400
G45 = 425
....

Why not use =MIN(H42,G44,G45) ?
 
D

David Biddulph

If you really wanted to use an IF statement, then you could change your
formula to
=IF(AND(H42<G44,H42<G45),H42,IF(G44<G45,G44,G45))
because the syntax of an IF statement is IF(condition,value if true,value if
false),
but of course MIN is the simpler way.
 

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