+ Reply to Thread
Results 1 to 9 of 9

Vlookup help

  1. #1
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Vlookup help

    How come sometimes when I use Vlookup, for example =Vlookup(A1, B10:B10, 2, False), if the cell A1 has a formula in it,
    it works sometimes, and other times it doesn't work. If I harcode cell A1, then it works. It's weird. Can someone explains to me why?

  2. #2
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Re: Vlookup help

    I actually using index, match now. I have this formula =MATCH(T95, 'Sheet2'!$A$2:$A$18, 0).. I have a formula in cell T95, and it doesn't work. However, when I hard code the number, it returns the correct location of the array. So weird.

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

    Re: Vlookup help

    what's the formula in t95 and what is in 'Sheet2'!$A$2:$A$18
    "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

  4. #4
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Vlookup help

    Just a blind shot...

    Try..

    =Vlookup(A1&"", B10:B10, 2, False)

    and =Vlookup(A1+0, B10:B10, 2, False)

    and let us know if any of these is working for you.. !!!
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  5. #5
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Re: Vlookup help

    It's just a left formula. It's weird because it's from a template I used from last month, and it worked just fine last month. I don't know why it doesn't work this month.

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

    Re: Vlookup help

    if its text it wont match a number see post#4
    mind you
    =Vlookup(A1&"", B10:B10, 2, False)will not work as its a single cell rang and doesn't have 2 columns!
    =MATCH(T95+0,'Sheet2'!$A$2:$A$18, 0)
    or
    =MATCH(T95&"",'Sheet2'!$A$2:$A$18, 0) may work
    Last edited by martindwilson; 12-12-2014 at 09:34 PM.

  7. #7
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Re: Vlookup help

    I found out why. It's because the formula cell "A1" is a text and the data in my vlookup table is not a text. I found out using ISTEXT function. Thank you anyways for your help guys.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Vlookup help

    Any time you use LEFT, RIGHT or MID, the result is always text, even if you are using it on a number.
    =LEFT(123456,3) will give you 123, but that is text, not numeric, and will not be found in a list that contains the number 123. To convert it back to a value/nuber, a quick way is to use =--LEFT(123456,3)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Florida
    MS-Off Ver
    Excel 2013
    Posts
    105

    Re: Vlookup help

    You can wrap it in "Value(Ref)" as well.

+ 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. Replies: 3
    Last Post: 12-04-2014, 01:27 PM
  2. Replies: 0
    Last Post: 12-26-2013, 01:12 PM
  3. Display Cell within VLookup range that excel thinks matches the VLookup Value
    By headachexcelperson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2013, 04:56 PM
  4. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  5. Replies: 5
    Last Post: 07-29-2009, 07:53 AM

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