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

Hi, oh mighty ones!

I'm trying to enter this formula in Excel:

=IF(B2=a,10,"IF(B2=b,8,IF(B2=c,6)))")

According to the nested formulas rule, it's well-formatted (and I'm not even
using the seven-limit). This is to calculate how many points one gets
according to each school grade, A, B or C. HOWEVER...though it doesn't give
me an actual error message, the formula result cell tells me this:

#NAME?

Can someone tell me what I'm doing wrong? Thanks...
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Nested formula trouble.

Hi

Not quite right with the setup of your formula, and where you are
testing for text as opposed to numeric values, they need to be enclosed
with double quotes
Try
=IF(B2="a",10,IF(B2="b",8,IF(B2="c",6,"")))

--
Regards

Roger Govier


"PowerPointless" wrote in
message ...
Hi, oh mighty ones!

I'm trying to enter this formula in Excel:

=IF(B2=a,10,"IF(B2=b,8,IF(B2=c,6)))")

According to the nested formulas rule, it's well-formatted (and I'm
not even
using the seven-limit). This is to calculate how many points one gets
according to each school grade, A, B or C. HOWEVER...though it doesn't
give
me an actual error message, the formula result cell tells me this:

#NAME?

Can someone tell me what I'm doing wrong? Thanks...



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Nested formula trouble.

Merci, Roger!!! You are a genius. I had tried the quotations before but not
in the right place. IT WORKS!!!!!! THank you so very much. Since I'm no
planning to get anything BELOW C on the class (a screenwriting class), I
won't add any more arguments to it.

There is one thing that doesn't make sense to me, though, and I'd appreciate
it if you can clarify it for me: I thought that one had to enclose in
quotations from the second to the last argument in the formula:

=IF(B2="a",10,"IF(B2="b",8,IF(B2="c",6,"))")

However, your solution shows that not only there aren't quotations before
the second IF, but there is an extra set of quotations with no partner (the
very last one):

=IF(B2="a",10,IF(B2="b",8,IF(B2="c",6,"")))

Is there any reason this illogical order works, or am I missing something
else?

Thanks in advance!
++++++++++++++++++++++++++++++++++++++++++++++++++ ++
Roger Govier" wrote:

Hi

Not quite right with the setup of your formula, and where you are
testing for text as opposed to numeric values, they need to be enclosed
with double quotes
Try
=IF(B2="a",10,IF(B2="b",8,IF(B2="c",6,"")))

--
Regards

Roger Govier


"PowerPointless" wrote in
message ...
Hi, oh mighty ones!

I'm trying to enter this formula in Excel:

=IF(B2=a,10,"IF(B2=b,8,IF(B2=c,6)))")

According to the nested formulas rule, it's well-formatted (and I'm
not even
using the seven-limit). This is to calculate how many points one gets
according to each school grade, A, B or C. HOWEVER...though it doesn't
give
me an actual error message, the formula result cell tells me this:

#NAME?

Can someone tell me what I'm doing wrong? Thanks...




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Nested formula trouble.

Roger's final empty string gives a blank answer if you either have an empty
input, or any value other than a, b, or c.

If you put quotes around "IF(B2="b",8,IF(B2="c",6,"))", then you'll get that
string as an output if the input isn't a, rather than evaluating the formula
[but you'd have further problems because you've got various quote symbols
within the string, and if you put quotes within a string they'd need to be
doubled:
=IF(B2="a",10,"IF(B2=""b"",8,IF(B2=""c"",6,""))") ]
--
David Biddulph

"PowerPointless" wrote in message
...
Merci, Roger!!! You are a genius. I had tried the quotations before but
not
in the right place. IT WORKS!!!!!! THank you so very much. Since I'm no
planning to get anything BELOW C on the class (a screenwriting class), I
won't add any more arguments to it.

There is one thing that doesn't make sense to me, though, and I'd
appreciate
it if you can clarify it for me: I thought that one had to enclose in
quotations from the second to the last argument in the formula:

=IF(B2="a",10,"IF(B2="b",8,IF(B2="c",6,"))")

However, your solution shows that not only there aren't quotations before
the second IF, but there is an extra set of quotations with no partner
(the
very last one):

=IF(B2="a",10,IF(B2="b",8,IF(B2="c",6,"")))

Is there any reason this illogical order works, or am I missing something
else?

Thanks in advance!
++++++++++++++++++++++++++++++++++++++++++++++++++ ++
Roger Govier" wrote:

Hi

Not quite right with the setup of your formula, and where you are
testing for text as opposed to numeric values, they need to be enclosed
with double quotes
Try
=IF(B2="a",10,IF(B2="b",8,IF(B2="c",6,"")))

--
Regards

Roger Govier


"PowerPointless" wrote in
message ...
Hi, oh mighty ones!

I'm trying to enter this formula in Excel:

=IF(B2=a,10,"IF(B2=b,8,IF(B2=c,6)))")

According to the nested formulas rule, it's well-formatted (and I'm
not even
using the seven-limit). This is to calculate how many points one gets
according to each school grade, A, B or C. HOWEVER...though it doesn't
give
me an actual error message, the formula result cell tells me this:

#NAME?

Can someone tell me what I'm doing wrong? Thanks...






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Nested formula trouble.

Thank you, David. That's a DUH moment for me, I should've thought of that,
but I had not slept for about 48 hours straight (though that shouldn't be an
excuse).

Thank you to both of you, you've helped me a lot. May you both win the next
Lotto! :)

"David Biddulph" wrote:

Roger's final empty string gives a blank answer if you either have an empty
input, or any value other than a, b, or c.

If you put quotes around "IF(B2="b",8,IF(B2="c",6,"))", then you'll get that
string as an output if the input isn't a, rather than evaluating the formula
[but you'd have further problems because you've got various quote symbols
within the string, and if you put quotes within a string they'd need to be
doubled:
=IF(B2="a",10,"IF(B2=""b"",8,IF(B2=""c"",6,""))") ]
--
David Biddulph

"PowerPointless" wrote in message
...
Merci, Roger!!! You are a genius. I had tried the quotations before but
not
in the right place. IT WORKS!!!!!! THank you so very much. Since I'm no
planning to get anything BELOW C on the class (a screenwriting class), I
won't add any more arguments to it.

There is one thing that doesn't make sense to me, though, and I'd
appreciate
it if you can clarify it for me: I thought that one had to enclose in
quotations from the second to the last argument in the formula:

=IF(B2="a",10,"IF(B2="b",8,IF(B2="c",6,"))")

However, your solution shows that not only there aren't quotations before
the second IF, but there is an extra set of quotations with no partner
(the
very last one):

=IF(B2="a",10,IF(B2="b",8,IF(B2="c",6,"")))

Is there any reason this illogical order works, or am I missing something
else?

Thanks in advance!
++++++++++++++++++++++++++++++++++++++++++++++++++ ++
Roger Govier" wrote:

Hi

Not quite right with the setup of your formula, and where you are
testing for text as opposed to numeric values, they need to be enclosed
with double quotes
Try
=IF(B2="a",10,IF(B2="b",8,IF(B2="c",6,"")))

--
Regards

Roger Govier


"PowerPointless" wrote in
message ...
Hi, oh mighty ones!

I'm trying to enter this formula in Excel:

=IF(B2=a,10,"IF(B2=b,8,IF(B2=c,6)))")

According to the nested formulas rule, it's well-formatted (and I'm
not even
using the seven-limit). This is to calculate how many points one gets
according to each school grade, A, B or C. HOWEVER...though it doesn't
give
me an actual error message, the formula result cell tells me this:

#NAME?

Can someone tell me what I'm doing wrong? Thanks...






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
Trouble with condition nested formula wilywayne New Users to Excel 2 August 31st 06 05:26 PM
'IF' formula trouble agw3 Excel Discussion (Misc queries) 2 August 9th 06 04:16 PM
Trouble with an IF formula glenn Excel Worksheet Functions 1 July 27th 06 07:31 PM
Trouble with nested IF formula TheRobsterUK Excel Worksheet Functions 1 October 5th 05 02:51 AM
Trouble with formula Keith Excel Discussion (Misc queries) 10 May 22nd 05 11:33 PM


All times are GMT +1. The time now is 09:24 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"