+ Reply to Thread
Results 1 to 6 of 6

Nested IF Statement-, it should be blank.

  1. #1
    Forum Contributor
    Join Date
    12-13-2007
    Posts
    138

    Nested IF Statement-, it should be blank.

    Hey everyone. I need some help on a nested IF statement.

    In column A, I have the following values:
    build
    chil rat
    datcen
    mang
    nextg
    ost rat
    omp
    sco rat

    In column B, I need the formula so it shows values that if column A = "build", "nextg" or "datcen", then the value in column B is "nextg" and if column A = "chil rat", "ost rat", "sco rat", then the value in column B is "mig". For everything else, it should be blank.

    Thanks in advance.
    Last edited by FM1; 02-10-2009 at 07:22 AM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    re: Nested IF Statement-, it should be blank.

    Hi,

    Can you give this a try?

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    re: Nested IF Statement-, it should be blank.

    Perhaps:

    Please Login or Register  to view this content.
    If this is full repertoire of values than you could adjust the 2nd test to look for RIGHT(A1,4)=" rat" rather than use the OR.

    EDIT: The above is only a slight variant on sweep's formula... I used TRIM as when I pasted your values there were trailing spaces so this may/may not be required.

  4. #4
    Valued Forum Contributor Rahul Nagar's Avatar
    Join Date
    09-18-2008
    Location
    nasik
    MS-Off Ver
    Excel 2003
    Posts
    465

    re: Nested IF Statement-, it should be blank.

    Hello

    you can use following formula

    =IF(A1="build","nextg",IF(A1="datcen","nextg",IF(A1="chil rat","mig",IF(A1="ost rat","mig",IF(A1="sco rat","mig",0)))))

    i think this might be help.
    __________________
    Regards
    Rahul Nagar
    Founder of www.myshortcutkeys.com.


    If you get the answer of your questions then please click EDIT in your original post then click on GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.

  5. #5
    Forum Contributor
    Join Date
    12-13-2007
    Posts
    138

    re: Nested IF Statement-, it should be blank.

    Both formulas worked perfectly Sweep and Donkey. Thaks again guys. Third time you guys have helped me out on this forum. Reputation added.
    Last edited by FM1; 02-10-2009 at 07:00 AM.

  6. #6
    Forum Contributor
    Join Date
    12-13-2007
    Posts
    138

    re: Nested IF Statement-, it should be blank.

    Quote Originally Posted by Rahul Nagar View Post
    Hello

    you can use following formula

    =IF(A1="build","nextg",IF(A1="datcen","nextg",IF(A1="chil rat","mig",IF(A1="ost rat","mig",IF(A1="sco rat","mig",0)))))

    i think this might be help.
    Thanks Rahul. The two formulas above have worked so Ill just stick to them.

    Cheers.

+ 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