ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF function won't do want I want (https://www.excelbanter.com/excel-worksheet-functions/109016-if-function-wont-do-want-i-want.html)

Loren

IF function won't do want I want
 
I'm trying to get an IF function to give me the choice of 3 different
percentage options from one cell. This is what I put in as my function in
cell BG37:
=IF(AA11<=30,S11*0.18,IF(AA11=31<90,S11*0.22,IF(AA 1190,S11*0.26)))

Where I want cell BG37 to multiply cell AA11 by 18% if cell S11 is < or = to
30
or
Cell BG37 to multiply cell AA11 by 22% if cell S11 is = to 31 but <90
lastly
Cell BG37 to multip;y cell AA11 by 26% if cell S11 or = to 90

The way I have it, the 1st and 3rd function work but the second one shows
FALSE if cell S11 is between 31 and 89.

--
Loren

bpeltzer

IF function won't do want I want
 
Assuming that the middle condition should be AA1130 and <90, then:
=IF(AA11<=30,0.18,IF(AA11<90,0.22,0.26))*S11
You only need two IFs; the third condition (=90) is selected when the
first two tests both fail.



"Loren" wrote:

I'm trying to get an IF function to give me the choice of 3 different
percentage options from one cell. This is what I put in as my function in
cell BG37:
=IF(AA11<=30,S11*0.18,IF(AA11=31<90,S11*0.22,IF(AA 1190,S11*0.26)))

Where I want cell BG37 to multiply cell AA11 by 18% if cell S11 is < or = to
30
or
Cell BG37 to multiply cell AA11 by 22% if cell S11 is = to 31 but <90
lastly
Cell BG37 to multip;y cell AA11 by 26% if cell S11 or = to 90

The way I have it, the 1st and 3rd function work but the second one shows
FALSE if cell S11 is between 31 and 89.

--
Loren


[email protected]

IF function won't do want I want
 
Loren wrote:
This is what I put in as my function in cell BG37:
=IF(AA11<=30,S11*0.18,IF(AA11=31<90,S11*0.22,IF(AA 1190,S11*0.26)))


Write this:

=if(AA11<=30, S11*0.18, if(AA11<90, S11*0.22, S11*0.26))

Where I want cell BG37 to multiply cell AA11 by 18% if cell S11 is < or = to
30 or
Cell BG37 to multiply cell AA11 by 22% if cell S11 is = to 31 but <90
lastly
Cell BG37 to multip;y cell AA11 by 26% if cell S11 or = to 90


(I presume you got AA11 and S11 mixed up above. Your IF() logic says
that you want to multiply S11 by 0.18 if AA11 is < or = to 30, for
example.)

This is implied by the order in which Excel processes the IF()
conditions. If AA1130 and fails the first condition, it is implicit
in the second condition that AA1130 and AA11<90.

The way I have it, the 1st and 3rd function work but the second one shows
FALSE if cell S11 is between 31 and 89.


Because you miswrote the "and" condition in the second IF(). Although
it is not necessary this time, if you ever want to write such a
condition in the future, it would be written AND(AA1130,AA11<90).


Arvi Laanemets

IF function won't do want I want
 
Hi

=S11*(0.18+0.04*((AA1130)+(AA190)))


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Loren" wrote in message
...
I'm trying to get an IF function to give me the choice of 3 different
percentage options from one cell. This is what I put in as my function in
cell BG37:
=IF(AA11<=30,S11*0.18,IF(AA11=31<90,S11*0.22,IF(AA 1190,S11*0.26)))

Where I want cell BG37 to multiply cell AA11 by 18% if cell S11 is < or =
to
30
or
Cell BG37 to multiply cell AA11 by 22% if cell S11 is = to 31 but <90
lastly
Cell BG37 to multip;y cell AA11 by 26% if cell S11 or = to 90

The way I have it, the 1st and 3rd function work but the second one shows
FALSE if cell S11 is between 31 and 89.

--
Loren





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

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