ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF THEN function help needed!! (https://www.excelbanter.com/excel-worksheet-functions/97938-if-then-function-help-needed.html)

Karen

IF THEN function help needed!!
 
I am trying to set up an IF-THEN function that will handle recognizing a
number between 2 other numbers and cannot seem to get it to work. My current
formula looks like this:

IF(27%<=AA16<=27.9%, round(M16*0.01,2),0)

Can anyone help with this? Right now if I plug in 27.5% in cell AA16 I get
0. My goal is for this formula to calculate to the following answer:

If AA16 = 27.5%
If M16 = 46900
Answer = 469.00

Elkar

IF THEN function help needed!!
 
You could try this:

=IF(INT(AA16)=27,ROUND(M16*.01,2),0)

This just checks the integer portion of the number in AA16. However, 27.91
would also be true in this case whereas your example would consider it false.

If that's a problem, then try:

=IF(AND(AA16=27,AA16<=27.9),ROUND(M16*.01,2),0)

HTH,
Elkar


"Karen" wrote:

I am trying to set up an IF-THEN function that will handle recognizing a
number between 2 other numbers and cannot seem to get it to work. My current
formula looks like this:

IF(27%<=AA16<=27.9%, round(M16*0.01,2),0)

Can anyone help with this? Right now if I plug in 27.5% in cell AA16 I get
0. My goal is for this formula to calculate to the following answer:

If AA16 = 27.5%
If M16 = 46900
Answer = 469.00


Sandy Mann

IF THEN function help needed!!
 
"Elkar" wrote in message
...
You could try this:

=IF(INT(AA16)=27,ROUND(M16*.01,2),0)


The Op's data was 27% so INT() will always return zero

I would suggest:

IF(FLOOR(AA16,1%)=27%,ROUND(M16*.01,2),0)

--
HTH

Sandy
In Perth, the ancient capital of Scotland


with @tiscali.co.uk





All times are GMT +1. The time now is 12:34 AM.

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