+ Reply to Thread
Results 1 to 6 of 6

Vlookup stumped!!

  1. #1
    Forum Contributor
    Join Date
    02-24-2010
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    195

    Lightbulb Vlookup stumped!!

    Can anyone explain whats gone wrong in the attached example. I've been messing around with this the past half hour and cant see any reason for the error!
    Attached Files Attached Files
    Last edited by TonyforVBA; 03-11-2014 at 08:26 AM.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Vlookup stumped!!

    Hi - vlookup will look at the first column of the lookup range to match the search term.

    So you are telling it to look in column L for the unit, which is stored in column M. Therefore it doesn't find anything and returns an error.

    In addition, you are not using absolute references, so the relative reference adjusts as you copy the formula down, meaning the lookup table is changing.

    You need to copy the column L data to column N and change your formula to:
    =VLOOKUP(C2,$M2:$N6,2,FALSE)

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Vlookup stumped!!

    If you don't want to change the data layout in your sheet as per the suggestion given by ragulduy, you can try the following formula in B2 and copy down.

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Vlookup stumped!!

    or
    =VLOOKUP(C2,CHOOSE({1,2},M2:M6,L2:L6),2,FALSE)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Vlookup stumped!!

    Hi
    In vlookup function the value you are looking up have to be in the first column of the table array. That is why it gives an error.
    =IFERROR(INDEX(L:L,MATCH(C2,M:M,0)),"")
    Appreciate the help? CLICK *

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: Vlookup stumped!!

    you can also use CHOOSE to do a left lookup

    =VLOOKUP($C2,CHOOSE({1,2},$M$2:$M$6,$L$2:$L$6),2,0)

    but its better to go with index.
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

+ 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. [SOLVED] VLOOKUP / ISNUMBER / SUMIF Stumped, can't get formula to run
    By abbyalana in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-29-2012, 04:47 PM
  2. Stumped on a formula (combo of sumif, vlookup, subtraction?)
    By silentheidi in forum Excel General
    Replies: 1
    Last Post: 05-11-2012, 07:26 PM
  3. [SOLVED] Stumped
    By Andibevan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-23-2005, 11:10 AM
  4. Still stumped
    By Robertgn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-09-2005, 09:40 PM
  5. I am stumped!
    By ^'^BatAttaK^'^ in forum Excel General
    Replies: 25
    Last Post: 02-15-2005, 08:07 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