Help required for formula

R

recklaw

I want to utilise a formula in excel, but am not sure exactly how to
enter it
My formula needs to do the following: -

If (A>B) then display x
If (A<B) then display y
If (A=B) then display z

Naturally I would prefer to do this in one cell.

Using the If command it would appear I could set the formula to say :
-

=IF(A1>B1,"X","Y")

However this will only display X if A is greater than B and Y if A is
less than or equal B.

Is there a way to work out the three different values?
 
R

recklaw

Just to let you all know I managed to work it out
I nested my formula using the following: -

=IF(A2>B2,"X",IF(A2<B2,"Y", IF(A2=B2,"Z"))
 

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