ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Nested formula trouble (https://www.excelbanter.com/excel-worksheet-functions/135271-nested-formula-trouble.html)

PowerPointless

Nested formula trouble
 
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.

David Biddulph[_2_]

Nested formula trouble
 
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.
--
David Biddulph

"PowerPointless" wrote in message
...
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.




Bernd

Nested formula trouble
 
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


Don Guillett

Nested formula trouble
 
=LOOKUP(B2,{"a","b","c"},{10,28,6})



--
Don Guillett
SalesAid Software

"PowerPointless" wrote in message
...
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.





All times are GMT +1. The time now is 08:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com