Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Nested IF statements
I am very new to this and need some help with the syntax for nested IF
functions, please. Here is what I am trying to achieve: Display in cell E2: 1) if there is no value in cell D2, blank (zero). 2) if the value in cell C2 is greater than the value in cell H3, display the value of cell C2 divided by four and then multiplied by the value in cell H11 [(C2/4)*H11] 3) if the value in cell C2 is less than the value in cell H3 but expressed as a negative number, then display the value of cell C2 divided by four and then multiplied by the value in cell H11 [C2/4)*H11]. 4) If neither condition 2 or 3 is true, then display blank (zero). Please help!!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Nested IF statements
Maybe something like this:
=IF(D2="", "", IF(C2H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11, ""))) -- Hope that helps. Vergel Adriano "Rod from Corrections" wrote: I am very new to this and need some help with the syntax for nested IF functions, please. Here is what I am trying to achieve: Display in cell E2: 1) if there is no value in cell D2, blank (zero). 2) if the value in cell C2 is greater than the value in cell H3, display the value of cell C2 divided by four and then multiplied by the value in cell H11 [(C2/4)*H11] 3) if the value in cell C2 is less than the value in cell H3 but expressed as a negative number, then display the value of cell C2 divided by four and then multiplied by the value in cell H11 [C2/4)*H11]. 4) If neither condition 2 or 3 is true, then display blank (zero). Please help!!! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Nested IF statements
Thanks for the help, Vergel. It's close, but for some reason it did not
evaluate the first part correctly. On one of the lines, there was a zero value in cell D2, but it still returned the calculation from one of the later IF statements. I need it to definitely display no value if there is no entry in cell D2, and then to go onto the other statements only if there is a value in D2. "Vergel Adriano" wrote: Maybe something like this: =IF(D2="", "", IF(C2H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11, ""))) -- Hope that helps. Vergel Adriano "Rod from Corrections" wrote: I am very new to this and need some help with the syntax for nested IF functions, please. Here is what I am trying to achieve: Display in cell E2: 1) if there is no value in cell D2, blank (zero). 2) if the value in cell C2 is greater than the value in cell H3, display the value of cell C2 divided by four and then multiplied by the value in cell H11 [(C2/4)*H11] 3) if the value in cell C2 is less than the value in cell H3 but expressed as a negative number, then display the value of cell C2 divided by four and then multiplied by the value in cell H11 [C2/4)*H11]. 4) If neither condition 2 or 3 is true, then display blank (zero). Please help!!! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Nested IF statements
Rod,
try it this way then. the first suggestion I gave checked only if D2 is blank. This one also checks if D2 is equal to 0. =IF(OR(D2="",D2=0), "", IF(C2H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11, ""))) -- Hope that helps. Vergel Adriano "Rod from Corrections" wrote: Thanks for the help, Vergel. It's close, but for some reason it did not evaluate the first part correctly. On one of the lines, there was a zero value in cell D2, but it still returned the calculation from one of the later IF statements. I need it to definitely display no value if there is no entry in cell D2, and then to go onto the other statements only if there is a value in D2. "Vergel Adriano" wrote: Maybe something like this: =IF(D2="", "", IF(C2H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11, ""))) -- Hope that helps. Vergel Adriano "Rod from Corrections" wrote: I am very new to this and need some help with the syntax for nested IF functions, please. Here is what I am trying to achieve: Display in cell E2: 1) if there is no value in cell D2, blank (zero). 2) if the value in cell C2 is greater than the value in cell H3, display the value of cell C2 divided by four and then multiplied by the value in cell H11 [(C2/4)*H11] 3) if the value in cell C2 is less than the value in cell H3 but expressed as a negative number, then display the value of cell C2 divided by four and then multiplied by the value in cell H11 [C2/4)*H11]. 4) If neither condition 2 or 3 is true, then display blank (zero). Please help!!! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Nested IF statements
Eureka! Thanks so much, Vergel. That did the trick!
"Vergel Adriano" wrote: Rod, try it this way then. the first suggestion I gave checked only if D2 is blank. This one also checks if D2 is equal to 0. =IF(OR(D2="",D2=0), "", IF(C2H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11, ""))) -- Hope that helps. Vergel Adriano "Rod from Corrections" wrote: Thanks for the help, Vergel. It's close, but for some reason it did not evaluate the first part correctly. On one of the lines, there was a zero value in cell D2, but it still returned the calculation from one of the later IF statements. I need it to definitely display no value if there is no entry in cell D2, and then to go onto the other statements only if there is a value in D2. "Vergel Adriano" wrote: Maybe something like this: =IF(D2="", "", IF(C2H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11, ""))) -- Hope that helps. Vergel Adriano "Rod from Corrections" wrote: I am very new to this and need some help with the syntax for nested IF functions, please. Here is what I am trying to achieve: Display in cell E2: 1) if there is no value in cell D2, blank (zero). 2) if the value in cell C2 is greater than the value in cell H3, display the value of cell C2 divided by four and then multiplied by the value in cell H11 [(C2/4)*H11] 3) if the value in cell C2 is less than the value in cell H3 but expressed as a negative number, then display the value of cell C2 divided by four and then multiplied by the value in cell H11 [C2/4)*H11]. 4) If neither condition 2 or 3 is true, then display blank (zero). Please help!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Nested if statements | Excel Worksheet Functions | |||
Nested IF statements using AND / OR | Excel Worksheet Functions | |||
Nested IF statements | New Users to Excel | |||
Nested IF Statements | Excel Discussion (Misc queries) | |||
what is the max no. of nested Ifs can an If Statements have in EXC | Excel Discussion (Misc queries) |