ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Urgent - Setting up a formula (https://www.excelbanter.com/excel-discussion-misc-queries/246272-urgent-setting-up-formula.html)

ns

Urgent - Setting up a formula
 
I am setting a following formula:

=IF(AB187,"A",IF(AB184,"B+",IF(AB178,"B",IF(AB1 72,"C",IF(AB1<73,"F",0)))))

for grades of student.

It gives me error. For example. If student got 87 he should have B+
according to formula. However, excel gives me "A" instead of B+.

Please help


Mike H

Urgent - Setting up a formula
 
Hi,


For 87 the formula will return B+.

If 87 is returning A then what you see in the cell probably isn't what's
actually there. It may be (say) 87.1 but you may not be able to see the
decimal part because of formatting.

Try this.

Put 87 in another cell (say)AC1 and try this formula
=AC1=AB3

If AB3 is really 87 the formula will return TRUE. If it returns false then
that's the problem.

You could overcome that with this formula

=LOOKUP(INT(AB1),{0,73,79,85,88},{"F","C","B","B+" ,"A"})

Mike

"NS" wrote:

I am setting a following formula:

=IF(AB187,"A",IF(AB184,"B+",IF(AB178,"B",IF(AB1 72,"C",IF(AB1<73,"F",0)))))

for grades of student.

It gives me error. For example. If student got 87 he should have B+
according to formula. However, excel gives me "A" instead of B+.

Please help


Bob Phillips[_3_]

Urgent - Setting up a formula
 
I get B+, but a better formula is

=LOOKUP(AB1,{0,"F";73,"C";78,"B";84,"B+";88,"A"})

--
__________________________________
HTH

Bob

"NS" wrote in message
...
I am setting a following formula:

=IF(AB187,"A",IF(AB184,"B+",IF(AB178,"B",IF(AB1 72,"C",IF(AB1<73,"F",0)))))

for grades of student.

It gives me error. For example. If student got 87 he should have B+
according to formula. However, excel gives me "A" instead of B+.

Please help





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

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