comparing two values

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

Guest

I have two columns: Col1: A and Col2: C, some values may be Col1: C and Col2:
A or some other ones may be Col1: A and Col2: A. Values range from A to F.
What I want to display is: if Col2 is less than Col1 display "Dropped", if
col2 is greater than col1 display "Improved", if col1 and col2 are the same
display "No change". Your assistance is greatly appreciated. Jerry
 
Jerry said:
I have two columns: Col1: A and Col2: C, some values may be Col1: C and Col2:
A or some other ones may be Col1: A and Col2: A. Values range from A to F.
What I want to display is: if Col2 is less than Col1 display "Dropped", if
col2 is greater than col1 display "Improved", if col1 and col2 are the same
display "No change". Your assistance is greatly appreciated. Jerry

If I understand your question correctly (the column explanation seems a
little bit confusing, my bad :-) ), this should solve your problem:

=IF(col1=col2,"no change",IF(col1>col2,"dropped","improved"))

Of course you'll need to replace Col1 and Col2 by the corresponding
cells of each column.
 
It does work good. Now I have a question, why when the values are C+ to a C-
it replies improved instead of Dropped. As you can see this is for school
grades. Thanks for the prompt answer.
 
Hi Jerry

AFAIK there's no way excel can the sort of comparison you're asking it to
without you providing excel with some sort of grading scale, so in an unused
part of your workbook in column A enter the different grades in descending
order (i'm assuming you're doing this on sheet 2 from cell A2 to A10)

then you can use the following formula

=IF(MATCH(A1,Sheet2!$A$2:$A$10,0)=MATCH(B1,Sheet2!$A$2:$A$10,0),"no
change",IF(MATCH(A1,Sheet2!$A$2:$A$10,0)<MATCH(B1,Sheet2!$A$2:$A$10,0),"dropped",
"improved"))

where A1 and B1 are the student's results.

Cheers
JulieD
 

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