Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 77
Default Nested IF statement

What did I do wrong?

Here's the scenario and the formula I wrote: If the value of D48 X C13 is
less than B13, the value should be B13. If the Value of D48 X C13 is greater
than D13, the value should be D13. Otherwise the value should be D48 X C13.


=IF(AND(D48*C13<B13),B13,"(IF(AND(D48*C13D13,D13) OR(D48*C13)")
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default Nested IF statement

What did you do wrong?

1 You've got an AND with only one argument, so unnecessary.
2 You've got quotes round most of the tail end of the formula, so it's a
text string and is not being evaluated.
3 Your second AND is combining the D48*C13D13 with D13, so it is therefore
effectively treating D13 as a logical (but again you didn't need an AND
here).
4 You've got no commas to divide the arguments of your second IF.
5 You've only got one argument for your OR function, so again it isn't doing
anything.
6 Your parentheses don't match.
....

Is that enough to be going on with?

You need to look at the syntax of the various Excel functions (and Excel's
help will aid you in following this through), and then fill in the various
arguments for the functions as you go.

If you want to do it using IF functions as you've expressed it, then it will
come out something like:
=IF(D48*C13<B13,B13,IF(D48*C13D13,D13,D48*C13))

but you can simplify it to =MAX(B13,MIN(D13,D48*C13)) or
=MEDIAN(B13,D48*C13,D13)
--
David Biddulph

"Teri" wrote in message
...
What did I do wrong?

Here's the scenario and the formula I wrote: If the value of D48 X C13 is
less than B13, the value should be B13. If the Value of D48 X C13 is
greater
than D13, the value should be D13. Otherwise the value should be D48 X
C13.


=IF(AND(D48*C13<B13),B13,"(IF(AND(D48*C13D13,D13) OR(D48*C13)")



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 77
Default Nested IF statement

You are WONDERFUL! Thank you :)

"David Biddulph" wrote:

What did you do wrong?

1 You've got an AND with only one argument, so unnecessary.
2 You've got quotes round most of the tail end of the formula, so it's a
text string and is not being evaluated.
3 Your second AND is combining the D48*C13D13 with D13, so it is therefore
effectively treating D13 as a logical (but again you didn't need an AND
here).
4 You've got no commas to divide the arguments of your second IF.
5 You've only got one argument for your OR function, so again it isn't doing
anything.
6 Your parentheses don't match.
....

Is that enough to be going on with?

You need to look at the syntax of the various Excel functions (and Excel's
help will aid you in following this through), and then fill in the various
arguments for the functions as you go.

If you want to do it using IF functions as you've expressed it, then it will
come out something like:
=IF(D48*C13<B13,B13,IF(D48*C13D13,D13,D48*C13))

but you can simplify it to =MAX(B13,MIN(D13,D48*C13)) or
=MEDIAN(B13,D48*C13,D13)
--
David Biddulph

"Teri" wrote in message
...
What did I do wrong?

Here's the scenario and the formula I wrote: If the value of D48 X C13 is
less than B13, the value should be B13. If the Value of D48 X C13 is
greater
than D13, the value should be D13. Otherwise the value should be D48 X
C13.


=IF(AND(D48*C13<B13),B13,"(IF(AND(D48*C13D13,D13) OR(D48*C13)")




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 statement with over 7 conditions - VBA? Isa Excel Discussion (Misc queries) 2 January 19th 07 08:41 PM
Nested IF statement with VLOOKUP James Hamilton Excel Discussion (Misc queries) 1 August 16th 06 07:46 AM
:confused: Nested if then else statement polk383 Excel Worksheet Functions 4 May 28th 06 06:02 PM
Problem with nested IF_OR statement DOOGIE Excel Worksheet Functions 7 June 24th 05 03:27 AM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM


All times are GMT +1. The time now is 11:21 PM.

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"