Multiple if functions

G

grazielle

I really need to know how could i do or use if functions :confused:

example
i have gotten all my students avarage and i want to put comments lik
if for example

Average ranges from 95 - 100 comments should be Excellent
Average ranges from 90 - 94 comments should be Very Good
Average ranges from 85 - 90 comments should be Good
Average ranges from 80 - 84 comments should be Passed
Average ranges from 79 - below comments should be faile
 
J

Jazzer

Hi grazielle,

One way to do this. Put a following table somewhere. In this example
in area F1:G5

0 failed
80 passed
85 good
90 very good
95 excellent

Now let's say you have values in column A starting from row one. Put in
B1 the following formula:

=VLOOKUP(A1,$F$1:$G$5,2)

and copy it down.

This should do the trick

- Asser
 
J

Jason Morin

Rather than IF, try:

=LOOKUP(A1,{0,80,85,90,95},{"Failed","Passed","Good","Very
Good","Excellent"})

where A1 holds the numerical grade.

HTH
Jason
Atlanta, GA
 
P

Peo Sjoblom

One way, with your average in A1

=LOOKUP(A1,{0;80;85;90;95},{"Failed";"Passed";"Good";"Very
Good";"Excellent"})

or

=IF(A1="","",LOOKUP(A1,{0;80;85;90;95},{"Failed";"Passed";"Good";"Very
Good";"Excellent"}))
 
N

Norman Harker

Hi Grazielle!

Use VLOOKUP functions for this as they are so flexible, easier than
multiple IF, and don't have the IF function nesting limitation.

In J1:K5 I have:
0 Fail
80 Pass
85 Good
90 Very Good
95 Excellent

In A1:
=VLOOKUP(A1,$J$1:$K$5,2)

This tells Excel to look up the mark in A1 against the table in J1:K5
and return the data in the second column

Pending entry of marks in A1 you'll get an annoying result of Fail. To
avoid this you can use:

=IF(A1="","",VLOOKUP(A1,$J$1:$K$5,2))

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 

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

Top