+ Reply to Thread
Results 1 to 3 of 3

If and then?

  1. #1
    Registered User
    Join Date
    02-29-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2007
    Posts
    5

    If and then?

    I want a formula that that looks at the results in column A and column B and based on those results puts a 0, 1 or 2 in column C

    If Score in A = Score in B then put a 1 in C

    If Score in A < Score in B then put a 0 in C

    If Score in A > Score in B then put a 2 in C

    I’ve sorted out the formula for the above BUT I also want to have column C display 0 to start with.

    As it stands at the moment it displays a “1” in column C before anything is entered in A or B because the criteria in A = B is true with both equalling “0”.

    Do I need something like IF A = 0 AND B = 0 THEN C = 0?

    If so, how do I write the syntax for the full formula?

    Pretty basic but I’m new to Excel!
    Last edited by Captain Legless; 02-29-2012 at 06:27 AM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Simple Formula Needed Please

    Welcome to the forum - could you please have a read of the forum rules and make sure you give your threads a title which is descriptive of the problem, as per rule 1.

    In the meantime, how's this for you?

    =IF(AND(ISNUMBER(A1),ISNUMBER(B1)),IF(A1=B1,1,IF(A1<B1,0,2)),0)

  3. #3
    Registered User
    Join Date
    02-29-2012
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: If and then?

    Thanks for the prompt reply Andrew, that appears to be working. I will try it some more tomorrow.

    Sorry for incorrect posting.

+ 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