Nested formula trouble

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, people...this is the second time I post this because the other one didn't
go through. I've added this formula to an Excel table:

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

According to the nested-formula rules, this formula is well-formatted. It's
to calculate the points one gets when assigned a particular letter-grade (A
thru C).

HOWEVER, though I don't get an actual error message, the cell where the
result should appear only reads this:

#NAME?

Can someone please tell me what I'm doing wrong? Much appreciated.
 
Whay you're doing wrong is forgetting quotes where you need them, around
text strings (because a, b, and c weren't defined as names), and putting
quotes where you don't want them, around your second IF statement.

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

You may also want to define what you want as a result if B2 is other than a,
b, or c.
 
Hello,
=IF(B2=a,10,"IF(B2=b,8,IF(B2=c,6)))")

You do not identify your strings/characters to Excel correctly.

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

Or
=INDEX({10,8,6},MATCH(B2,{"a","b","c"},FALSE))

Regards,
Bernd
 

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

Back
Top