Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested if statements JBS Excel Worksheet Functions 2 March 6th 09 05:45 PM
Nested IF statements using AND / OR Joe[_13_] Excel Worksheet Functions 2 February 9th 09 06:14 PM
Nested IF statements Karrisac15 New Users to Excel 1 July 19th 07 08:06 PM
Nested IF Statements Django Excel Discussion (Misc queries) 2 March 4th 06 01:44 AM
what is the max no. of nested Ifs can an If Statements have in EXC StevenE Excel Discussion (Misc queries) 1 June 27th 05 03:03 PM


All times are GMT +1. The time now is 09:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"