+ Reply to Thread
Results 1 to 5 of 5

IF function with three different possibilities

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    26

    Lightbulb IF function with three different possibilities

    Hi,

    I have
    A --------- B --------- C --------- D ------------ E

    Name1 --- Name2 --- Address1 --- Address2 --------- Result
    A ---------- B -------- 1 Street ------ 1 Street -------- 1

    A ----------- 0 --------- 1 Street ------ 0 --------- 1

    A ---------- B -------- 1 Street ------ 2 Street --------- 2


    When Address1 & Address2 are same i would like the result column to say '1'

    When Address2 is '0' I would like the If function to always say '1' in result column

    When Address1 & Adress2 are different then I would like the If function to say '2' in result column, is it possible ?

    When I use the following statement I always get values in minus. Can someone please assist ? Sorry for the trouble as I am a noob in excel - ta

    IF(C3=D3,1,0)-IF(D3=0,1,2)
    Last edited by kbriaz; 03-25-2013 at 06:55 PM.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: IF function with three different possibilities

    =if(or( c3=d3,c3=0),1,2)
    Gary's Student

  3. #3
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: IF function with three different possibilities

    =if(and(c2=d2,d=0),"1","2")

    hth
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  4. #4
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: IF function with three different possibilities

    mine should have been an OR not an AND....sorry about that....

  5. #5
    Registered User
    Join Date
    03-25-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: IF function with three different possibilities

    Not at all, in fact thanks a lot for your help. safe

+ 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