If ... testing 3 conditions

  • Thread starter Thread starter Michel Khennafi
  • Start date 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
 
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
 
Back
Top