+ Reply to Thread
Results 1 to 8 of 8

lookup not working

  1. #1
    Registered User
    Join Date
    07-12-2009
    Location
    oxford,england
    MS-Off Ver
    Excel Microsoft 365
    Posts
    53

    lookup not working

    Hi,

    I've used lookups for years and have never had a problem,but for some reason the attached file will not return the appropriate cell value.

    I've tried reformatting etc with no luck.
    I would love to know why this is not working,can anyone help?

    Doug
    Attached Files Attached Files

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: lookup not working

    You values in Column A are mixed: entries are there both text and general formatted, whereas majority entries of column D (C labeled) are general formatted. So, VLOOKUP not able to find text entries within numeric and vise versa. Try to format all your values in lookup column either text or general format

    Or use this formula
    =INDEX($E$3:$E$30,MATCH(TRUE,INDEX((--$A3=--$D$3:$D$30),0),0))
    Last edited by contaminated; 08-22-2010 at 04:34 PM.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: lookup not working

    Your numbers sometimes are stored as text and sometimes as numbers...

    This should do it: =VLOOKUP(TEXT(A3,0),TEXT($D$3:$E$3000,0),2,FALSE)

    comfirmed with ctrl+shift+enter

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: lookup not working

    or this non-array:

    =INDEX(E:E,MATCH(TEXT(A3,0),INDEX(TEXT(D:D,0),0),0))

  5. #5
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: lookup not working

    dougmorgan
    As you noticed both ZBor and me suggested array formulas. Mine just isn't confirmed w/ctrl+shift+enter, but works just like array formula. In zbor's example huge range was used as table array for VLOOKUP function: up to 3000. This makes your workbook heavier and slows down calculation jobs independent from if you use my formula or zbor's

    I advise you to reformat ALL you values to GENEAL and never allign text to the left. Numbers are stored at right, text is at the left.
    Last edited by contaminated; 08-22-2010 at 04:45 PM.

  6. #6
    Registered User
    Join Date
    07-12-2009
    Location
    oxford,england
    MS-Off Ver
    Excel Microsoft 365
    Posts
    53

    Re:Sorted- lookup not working

    Thanks for your help,all now sorted.

    Doug

  7. #7
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Kalgoorlie Australia
    MS-Off Ver
    Excel 2007/10
    Posts
    251

    Re: lookup not working

    Hello dougmorgan
    As zbor has said, some of the numbers are stored as numbers and some as text.
    Is there a reason for this or can they be convertered to numbers.
    By converting to numbers your formula works fine!
    To mass convert, find a empty cell, ensure it is formatted as a number, place one (1) in it.
    Now copy it and high-light the columns you need to convert, special paste- multiply.
    This will convert all to numbers, your formulas work fine.
    Hope this helps
    Regards
    Peter

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

    Re: lookup not working

    just adding 0 with paste special to both columns will fix it
    "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

+ 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