+ Reply to Thread
Results 1 to 6 of 6

Mulitple if statements and vlookups

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    Lake Elsinore
    MS-Off Ver
    Excel 2010
    Posts
    46

    Unhappy Mulitple if statements and vlookups

    Hello,
    I'm attempting to write an IF statement with vlookups (I've tried the formula as a Nested, but continue to get an error). I've attempted to place an ISNA within the formula but, can't figure out how to get to the second vlookup.

    =IF(A3=1,"",IF(C6>2,IF(A3=2,VLOOKUP(D11,ACG3:ACI4500,2,FALSE),if(A3=3,VLOOKUP(D11,ACJ3:ACK4500,2,FALSE))))

    In words:

    If Cell A3 (Country) equals 1 (1 = "select a county"), then I want the formula to stop
    If Cell C6 is greater than 2 (1 = Select Text or part Number, 2 = Search by Text and 3 = Search by Part Number) and Cell A3 equals 2 (2 = CAD item)
    then I want you to lookup the part number entered in Cell D11 from Columns ACG3:ACI4500 (CAD pricebook)
    and return the Description of the part number (column 2);
    HOWEVER ,
    If Cell A3 equals 3 (3 = USD item) then I want you to lookup the part number entered in Cell D11 from Columns ACJ3:ACK4500 (USD pricebook)
    and return the Description of the part number (column 2)

    The formula keeps getting stuck on the 1st VLOOKUP becuase it returns an N/A#

    Please help.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Mulitple if statements and vlookups

    So you are saying that C6 is greater than 2 and A3 is equal to 2, so your first VLOOKUP should return a result? If so, then make sure the value in D11 exactly matches the value in column ACG
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-11-2012
    Location
    Lake Elsinore
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Mulitple if statements and vlookups

    ACG & ACJ are lists of part numbers - D11 is one part number that I needed to look up. If the order is CAD I need the part number to be looked up in the CAD Parts List (ACG) if the order is USD I need the part to be looked up on the USD Parts list (ACJ). Cell A3 determins if the order is CAD or USD.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Mulitple if statements and vlookups

    Are the parts actually numeric? IF so, are the columns of numbers formatted like D11?

  5. #5
    Registered User
    Join Date
    10-11-2012
    Location
    Lake Elsinore
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Mulitple if statements and vlookups

    Format of part number = abc-def-ghi (alpha)

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Mulitple if statements and vlookups

    The other thing to check then, is look for extra spaces at the end of the matching strings...

    If still a no-go, post a sample workbook.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mulitple VLOOKUPS
    By infamousurge in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-24-2013, 05:41 AM
  2. Mulitple IF statements
    By baldj003 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-11-2013, 10:41 AM
  3. Using VLOOKUPS to return mulitple values
    By mscomputertutor in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-14-2010, 10:05 AM
  4. mulitple IF statements
    By Back2Basics in forum Excel General
    Replies: 5
    Last Post: 12-04-2008, 04:33 PM

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