If ... testing 3 conditions

  • Thread starter Michel Khennafi
  • Start date
M

Michel Khennafi

Hi Experts,

In a cell C1 would like to test the values that exist in two cells A1 and B1

I would like to compare the value in column B to the one in column A and
perform the following test

- if value in B1 < value in A1 then in C1 display "+"
- if value in B1 > value in A1 then in C1 display "-"
- if value in B1 = value in A1 then in C1 display "="

What would be the if statement like in C1?

Thanks a lot for your assistance!

MK
 
R

Ron Rosenfeld

Hi Experts,

In a cell C1 would like to test the values that exist in two cells A1 and B1

I would like to compare the value in column B to the one in column A and
perform the following test

- if value in B1 < value in A1 then in C1 display "+"
- if value in B1 > value in A1 then in C1 display "-"
- if value in B1 = value in A1 then in C1 display "="

What would be the if statement like in C1?

Thanks a lot for your assistance!

MK

Just another thought without using an IF statement:

in C1: =SIGN(A1-B1)

Then, Format/Cells/Custom/Type: +;-;=


--ron
 

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