+ Reply to Thread
Results 1 to 3 of 3

Help required for formula

  1. #1
    Registered User
    Join Date
    03-15-2006
    Posts
    6

    Help required for formula

    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?

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Lightbulb

    =IF(A1=B1,"Z",IF(A1<B1,"Y","X"))
    This should work

  3. #3
    Registered User
    Join Date
    03-15-2006
    Posts
    6

    Thanks but I managed to work it out

    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")))

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1