ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If to determine lessor of three values (https://www.excelbanter.com/excel-worksheet-functions/202278-if-determine-lessor-three-values.html)

Jo-Anne[_2_]

If to determine lessor of three values
 
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 a
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

Harlan Grove[_2_]

If to determine lessor of three values
 
Jo-Anne wrote...
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 a
H42 = 500
G44 = 400
G45 = 425

....

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

Duke Carey

If to determine lessor of three values
 
use

=Min(H42,G44:G45)


"Jo-Anne" wrote:

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 a
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


David Biddulph[_2_]

If to determine lessor of three values
 
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.
--
David Biddulph

"Jo-Anne" wrote in message
...
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 a
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





All times are GMT +1. The time now is 07:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com