+ Reply to Thread
Results 1 to 4 of 4

VLookup nested in If/then statement

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    VLookup nested in If/then statement

    I'm trying to nest a vlookup in a if/then statement. I want to say the following:

    if the vlookup does not find the result then give me "I" otherwise give me "C"

    It looks as follows: '=IF(VLOOKUP(AA15,Sheet1!B:B,1,FALSE)="N/A","I","C")

    I get the result of "C" when it finds AA15 in the column B on Sheet1, but I get N/A otherwise, I want "I".

    Any ideas on what I'm doing wrong, please help. Thanks.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: VLookup nested in If/then statement

    =IF(ISERROR(VLOOKUP(AA15,Sheet1!B:B,1,FALSE)),"I","C")

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: VLookup nested in If/then statement

    Hi,

    maybe:

    =IF(iserror(VLOOKUP(AA15,Sheet1!B:B,1,0)),"I","C")

    Regards


    Edit: Excuse JieJenn: same answer, I did not mean to overlap.
    Last edited by canapone; 08-29-2012 at 11:31 AM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  4. #4
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: VLookup nested in If/then statement

    Thanks, I thought of that after I posted, awesome work, Thanks!

+ 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