+ Reply to Thread
Results 1 to 2 of 2

Returning different values when comparing 2 cells

  1. #1
    Registered User
    Join Date
    06-17-2008
    Location
    London
    Posts
    11

    Returning different values when comparing 2 cells

    I need an if statement for 3 different scenario's :

    Cell A1 = value a
    Cell A2 = value b

    Scenario 1
    Cell A3 = where cell A1 is greater than A2 the value in cell A3 = x

    Scenario 2
    Cell A3 = where cell A1 is equal to A2 the value in cell A3 = y

    Scenario 3
    Cell A3 = where cell A1 is less than A2 the value in cell A3 = z

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try

    =If(A1>A2,"x",IF(A1=A2,"y","z"))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Select and copy cells based on values in another cells
    By JoC in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2008, 04:39 AM
  2. Replies: 6
    Last Post: 06-19-2008, 01:41 PM
  3. Returning multiple values
    By philibe in forum Excel General
    Replies: 5
    Last Post: 06-06-2008, 06:45 AM
  4. Choosing cells dependant on values
    By richgw in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-18-2007, 12:02 PM

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