Nested IF statements

  • Thread starter Rod from Corrections
  • Start date
R

Rod from Corrections

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!!!
 
V

Vergel Adriano

Maybe something like this:

=IF(D2="", "", IF(C2>H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11, "")))
 
R

Rod from Corrections

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 said:
Maybe something like this:

=IF(D2="", "", IF(C2>H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11, "")))


--
Hope that helps.

Vergel Adriano


Rod from Corrections said:
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!!!
 
V

Vergel Adriano

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(C2>H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11,
"")))


--
Hope that helps.

Vergel Adriano


Rod from Corrections said:
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 said:
Maybe something like this:

=IF(D2="", "", IF(C2>H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11, "")))


--
Hope that helps.

Vergel Adriano


Rod from Corrections said:
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!!!
 
R

Rod from Corrections

Eureka! Thanks so much, Vergel. That did the trick!

Vergel Adriano said:
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(C2>H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11,
"")))


--
Hope that helps.

Vergel Adriano


Rod from Corrections said:
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 said:
Maybe something like this:

=IF(D2="", "", IF(C2>H3,(C2/4)*H11,IF(AND(C2<H3, C2<0), (C2/4)*H11, "")))


--
Hope that helps.

Vergel Adriano


:

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!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top