ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Nested If/And/Or statements (https://www.excelbanter.com/excel-worksheet-functions/257548-nested-if-statements.html)

BELINDA

Nested If/And/Or statements
 
=IF(AND(B6="FT",(IF(D64,15,IF(D6=2,10,IF(D6=2,1 0,IF(D6=1,5,0)

Hi. I am trying to create a formula to return the values above if the
"B6="FT" is true. If true return the values for the nested if statement, else
return zero. I either get an error or "True" or "False". I want to return
either 15, 10,5, or zero. Can you help me fix this formula to give me the
results I need?

Thank you!



JP Ronse

Nested If/And/Or statements
 
Belinda,

Try this

if(B6="FT", if(D64,15,if(D6=2,10,if(D6=1,5,0,""))),"")

Wkr,

JP



"Belinda" wrote in message
...
=IF(AND(B6="FT",(IF(D64,15,IF(D6=2,10,IF(D6=2,1 0,IF(D6=1,5,0)

Hi. I am trying to create a formula to return the values above if the
"B6="FT" is true. If true return the values for the nested if statement,
else
return zero. I either get an error or "True" or "False". I want to return
either 15, 10,5, or zero. Can you help me fix this formula to give me the
results I need?

Thank you!





Don Guillett[_2_]

Nested If/And/Or statements
 
=IF(D6=4,15,IF(D6=2,10,IF(D6=1,5,0)))
=IF(B6="ft",IF(D6=4,15,IF(D6=2,10,IF(D6=1,5,0)) ),"")

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Belinda" wrote in message
...
=IF(AND(B6="FT",(IF(D64,15,IF(D6=2,10,IF(D6=2,1 0,IF(D6=1,5,0)

Hi. I am trying to create a formula to return the values above if the
"B6="FT" is true. If true return the values for the nested if statement,
else
return zero. I either get an error or "True" or "False". I want to return
either 15, 10,5, or zero. Can you help me fix this formula to give me the
results I need?

Thank you!




Bob Phillips[_4_]

Nested If/And/Or statements
 
Try

=IF(B6="FT",(IF(D64,15,IF(D6=2,10,IF(D6=1,5,0)) )))

HTH

Bob

"Belinda" wrote in message
...
=IF(AND(B6="FT",(IF(D64,15,IF(D6=2,10,IF(D6=2,1 0,IF(D6=1,5,0)

Hi. I am trying to create a formula to return the values above if the
"B6="FT" is true. If true return the values for the nested if statement,
else
return zero. I either get an error or "True" or "False". I want to return
either 15, 10,5, or zero. Can you help me fix this formula to give me the
results I need?

Thank you!





Joe User[_2_]

Nested If/And/Or statements
 
"Belinda" wrote:
=IF(AND(B6="FT",(IF(D64,15,IF(D6=2,10,IF(D6=2,1 0,IF(D6=1,5,0)
[....] I am trying to create a formula to return the
values above if the "B6="FT" is true. If true return
the values for the nested if statement, else return zero.


You state quite clearly that you want zero if B6<"FT". You also state
quite clearly that you want only the results "15, 10,5, or zero". So:

=IF(B6<"FT", 0,
IF(D64,15,IF(D6=2,10,IF(D6=1,5,0))))

There are alternative formulas that avoid that deep function nesting,
depending on what you know about the values in D6. For example:

=IF(B6<"FT", 0,
LOOKUP(D6,{-1E307,1,2,4},{0,5,10,15}))

-1E307 should cover all values of D6<1. But if you know that D6 is, say, no
less than 0, replace -1E307 with 0 for a more readable formula.


----- original message -----

"Belinda" wrote:
=IF(AND(B6="FT",(IF(D64,15,IF(D6=2,10,IF(D6=2,1 0,IF(D6=1,5,0)

Hi. I am trying to create a formula to return the values above if the
"B6="FT" is true. If true return the values for the nested if statement, else
return zero. I either get an error or "True" or "False". I want to return
either 15, 10,5, or zero. Can you help me fix this formula to give me the
results I need?

Thank you!




All times are GMT +1. The time now is 02:55 PM.

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