+ Reply to Thread
Results 1 to 3 of 3

Nested "IF" Statement Syntax Help for MS Excel 2007

Hybrid View

  1. #1
    Registered User
    Join Date
    01-26-2013
    Location
    CT
    MS-Off Ver
    Excel 2007
    Posts
    2

    Nested "IF" Statement Syntax Help for MS Excel 2007

    Greetings, All!

    I have two separate IF statements that work independently, but need help with the syntax when attempting to combine the two statements into a single, functional, nested IF statement.

    Based on the results of an earlier evaluation (determining what asset ownership data a requestor is authorized to see), my worksheet cell needs to retrieve and reflect a specific asset owner name. Here are the independent statements that currently function as expected:

    1) =IF(AND($C$4 ="YES, REPRESENTS LEAD OWNER",'Inputs-LOAD_DATA_FOR_LARF'!V4<>""),'Inputs-LOAD_DATA_FOR_LARF'!V4,"")

    2) =IF(AND($C$4="YES, REPRESENTS ASSET OWNER",ISNA(VLOOKUP($M$5,'Inputs-LOAD_DATA_FOR_LARF'!$U$4:$V$40,2,FALSE))),"",VLOOKUP($M$5,'Inputs-LOAD_DATA_FOR_LARF'!$U$4:$V$40,2,FALSE))

    Using "IF( condition1, value_if_true1, IF( condition2, value_if_true2, value_if_false2 ))" as my guide, I have tried to create a single, functional nested if statement to no avail. Here's my latest attempt that yielded #NA:

    =IF(AND($C$4="YES, REPRESENTS ASSET OWNER",ISNA(VLOOKUP($M$5,'Inputs-LOAD_DATA_FOR_LARF'!$U$4:$V$40,2,FALSE))),"",VLOOKUP($M$5,'Inputs-LOAD_DATA_FOR_LARF'!$U$4:$V$40,2,FALSE)), IF(AND($C$4 ="YES, REPRESENTS LEAD OWNER",'Inputs-LOAD_DATA_FOR_LARF'!V4<>""),'Inputs-LOAD_DATA_FOR_LARF'!V4,"")

    Can someone help me with the correct MS Excel 2007 syntax, so I can combine #1 and 2 into a functional nested if statement? I'm stumped!
    Last edited by kasmoon0769; 01-26-2013 at 03:52 PM.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,119

    Re: Nested "IF" Statement Syntax Help for MS Excel 2007

    =IF(AND($C$4="YES, REPRESENTS ASSET OWNER",ISNA(VLOOKUP($M$5,'Inputs-LOAD_DATA_FOR_LARF'!$U$4:$V$40,2,FALSE))),"",VLOOKUP($M$5,'Inputs-LOAD_DATA_FOR_LARF'!$U$4:$V$40,2,FALSE)), IF(AND($C$4 ="YES, REPRESENTS LEAD OWNER",'Inputs-LOAD_DATA_FOR_LARF'!V4<>""),'Inputs-LOAD_DATA_FOR_LARF'!V4,"")
    that ist red,blue,green part is the full IF statement and so the grey is not part of the IF as you already have the 3 factors

    Test, "", vlookup
    TEST ,TRUE , FALSE
    Using "IF( condition1, value_if_true1, IF( condition2, value_if_true2, value_if_false2 ))" as my guide, I have tried to create a single, functional nested if statement to no avail. Here's my latest attempt that yielded #NA:
    is the correct use of a nested IF

    so the "" is common - it may be worth rearranging the tests so that a false is ""
    Last edited by etaf; 01-26-2013 at 03:35 PM.

  3. #3
    Registered User
    Join Date
    01-26-2013
    Location
    CT
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Nested "IF" Statement Syntax Help for MS Excel 2007

    Here's where I landed:

    =IF(AND($C$4="YES, REPRESENTS LEAD OWNER",'Inputs-LOAD_DATA_FOR_LARF'!V4<>""),'Inputs-LOAD_DATA_FOR_LARF'!V4,IF($C$4="YES, REPRESENTS ASSET OWNER",VLOOKUP($M$5,'Inputs-LOAD_DATA_FOR_LARF'!$U$4:$V$40,2,FALSE),""))

    I just need to test it to make sure it really does work! Thanks for pointing me in the right direction, etaf!

+ 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