ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   logic test with nested IF fuctions - help (https://www.excelbanter.com/excel-worksheet-functions/193755-logic-test-nested-if-fuctions-help.html)

marla

logic test with nested IF fuctions - help
 
I'm trying to write a logical function with 4 nested IF functions in a cell.
The Excel help menu and a manual I referenced used examples with exact
numbers rather than a series of numbers - which is what I need. Please see
examples below.

IF(H7<5,(F7),IF(H7=5,(F7*0.9)))
this formula is operational but incomplete for my needs. In the second IF
function, I need not only a "5" but a series of numbers: "5 up to 9" or "5
but less than 10"

Beyond that, I need to add 2 more IF functions after the second, for a total
of 4 IF functions in the cell.
IF(H7<5,(F7),IF(H7=5 and <10,(F7*0.9),IF(H7=10 and
<25,(F7*.85),IF(H7=25,(F7*.80)))))


bpeltzer

logic test with nested IF fuctions - help
 
The syntax for the 'and' function is and(condition1,condition2). But since
you won't test for =5 and <7, for example, unless you've already failed the
test for <5, you really don't need to test again for =5 so the 'and' isn't
needed:
=if(h7<5,f7,if(h7<10,f7*0.9,if(h7<25,f7*0.85,f7*0. 8)))

"marla" wrote:

I'm trying to write a logical function with 4 nested IF functions in a cell.
The Excel help menu and a manual I referenced used examples with exact
numbers rather than a series of numbers - which is what I need. Please see
examples below.

IF(H7<5,(F7),IF(H7=5,(F7*0.9)))
this formula is operational but incomplete for my needs. In the second IF
function, I need not only a "5" but a series of numbers: "5 up to 9" or "5
but less than 10"

Beyond that, I need to add 2 more IF functions after the second, for a total
of 4 IF functions in the cell.
IF(H7<5,(F7),IF(H7=5 and <10,(F7*0.9),IF(H7=10 and
<25,(F7*.85),IF(H7=25,(F7*.80)))))


Teethless mama

logic test with nested IF fuctions - help
 
=LOOKUP(H7,{0,5,10,25;1,0.9,0.85,0.8})*F7


"marla" wrote:

I'm trying to write a logical function with 4 nested IF functions in a cell.
The Excel help menu and a manual I referenced used examples with exact
numbers rather than a series of numbers - which is what I need. Please see
examples below.

IF(H7<5,(F7),IF(H7=5,(F7*0.9)))
this formula is operational but incomplete for my needs. In the second IF
function, I need not only a "5" but a series of numbers: "5 up to 9" or "5
but less than 10"

Beyond that, I need to add 2 more IF functions after the second, for a total
of 4 IF functions in the cell.
IF(H7<5,(F7),IF(H7=5 and <10,(F7*0.9),IF(H7=10 and
<25,(F7*.85),IF(H7=25,(F7*.80)))))



All times are GMT +1. The time now is 08:07 AM.

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