+ Reply to Thread
Results 1 to 3 of 3

An if statement for more than two possibilities

  1. #1
    Registered User
    Join Date
    12-09-2008
    Location
    Australia
    Posts
    27

    An if statement for more than two possibilities

    When writing an if statement for 2 options "2-0" or "2-1" as answers you can write =IF(A1"2-0",B1,C1) which returns B1 if A is 2-0 otherwise it returns C1 reading.
    So A1 will either be 2-0 or 2-1 and B1 and C1 have readings like 2.35 and 3 so if A1 was 2-0 and in B1 was 2.35 then it would read 2.35.... etc

    How do i write it if A1 can equal 3 different things for example A1 can be 3-0 or 3-1 or 3-2.

    Do i need to post an example or can someone relate to what im trying to achieve?
    Last edited by percivaltroy; 05-25-2009 at 04:33 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: An if statement for more than two possibilities

    that would be nice

    Generaly you do this:

    =IF(A1=statement1; B1; IF(A1=statement2; B2; IF(A1=statement3; B3; C1))) etc
    Last edited by zbor; 05-25-2009 at 02:11 AM.

  3. #3
    Registered User
    Join Date
    12-09-2008
    Location
    Australia
    Posts
    27

    Re: An if statement for more than two possibilities

    thnx that was fine

+ 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