+ Reply to Thread
Results 1 to 6 of 6

Vlookup using cell with results of if statement

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    2

    Vlookup using cell with results of if statement

    =IF(IFERROR(FIND("800",D11),)>0,"800",IF(IFERROR(FIND("1000",D11),)>0,"1000",IF(IFERROR(FIND("1200",D11),)>0,"1250",IF(IFERROR(FIND("1600",D11),)>0,"1600",IF(IFERROR(FIND("2000",D11),)>0,"2000","#Value")))))

    The calculation to the above is a value of 800 for a particular cell

    I want to use this cell in a Vlookup as the lookup value and return NW08

    Is there any reason why this won't work?

    =Vlookup($C$4,$E$20:$E$31,2,False)

    Number Code
    800 NW08
    1000 NW10
    1250 NW12
    1600 NW16
    2000 NW20
    2500 NW25
    3200 NW32
    4000 NW40
    4500 NW40b
    5000 NW50
    6300 NW63

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Vlookup using cell with results of if statement

    One reason could be that Exell see the numbers in quotes, as TEXT.

    IF(IFERROR(FIND("800",D11)......

    Use

    IF(IFERROR(FIND(800,D11)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Vlookup using cell with results of if statement

    Hi,

    The value your IF.. cell is returning is the text value "800" and not a numeric value 800. I suspect your Vlookup table has numbers in the first column rather than text.
    Change either your table or your IF.. formula.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    08-14-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Vlookup using cell with results of if statement

    Thanks guys that might be the case. I have tried changing both the formula and table to text and no luck.
    Can you suggest an "IF,AND,OR" formula that would replace the IFERROR formula?


    =IF(IFERROR(FIND("800",D11),)>0,"800",IF(IFERROR(FIND("1000",D11),)>0,"1000",IF(IFERROR(FIND("1200",D11),)>0,"1250",IF(IFERROR(FIND("1600",D11),)>0,"1600",IF(IFERROR(FIND("2000",D11),)>0,"2000","#Value")))))

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Vlookup using cell with results of if statement

    cAN YOU UPLOAD A SMALL SAMPLE WORKBOOK?

  6. #6
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Vlookup using cell with results of if statement

    What are the possible entries in D11?

    See if this works

    =IFERROR(LOOKUP(2,1/FIND({800,1000,1200,1250,1600,2000},D11),{800,1000,1200,1250,1600,2000}),NA())

+ 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