+ Reply to Thread
Results 1 to 13 of 13

vlookup not returning proper value

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    vlookup not returning proper value

    Hello all,
    Ok I'm using a vlookup formula that is working great for what I want but I discovered that when I enter a date on my sheet the formula is not returning the actual date I entered but it is returning just numbers. I've tried to format the cell to (date) and it still wont work. Does anyone have a suggestion I can try to correct this?
    thx in advance
    mrggutz
    Last edited by mrggutz; 10-19-2010 at 09:36 AM.

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

    Re: vlookup not returning proper value

    post a sample.formatting should work,
    "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

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: vlookup not returning proper value

    mrggutz,

    Please attach your workbook: click on the New Post button, then scroll down and click on the Manage Attachments button.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: vlookup not returning proper value

    The cell with the VLOOKUP needs formatting as a date, Excel dates are actually numbers
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    Re: vlookup not returning proper value

    I tried formatting the cell that has the vlookup formula to (Date) and still got only numbers.

    Here is my formula
    =VLOOKUP(DATA!$B$6,Info!$F$5:$EC$500,42,0)&""

  6. #6
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    Re: vlookup not returning proper value

    workbook to big to attach...sry

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

    Re: vlookup not returning proper value

    why the &"" at the end? thats changing the date value to text so it wont format as date
    Last edited by martindwilson; 10-19-2010 at 09:23 AM.

  8. #8
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    Re: vlookup not returning proper value

    well looky there that did it, I had that at the end to help return a blank cell if nothing in cell rather then have 0 in all the cells that didn't have a returned value. But it works now thx I learned something new today.
    thx again,
    mrggutz

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: vlookup not returning proper value

    To get the blank instead of a 0 (if that's truly what you want) you can use:

    =if(VLOOKUP(DATA!$B$6,Info!$F$5:$EC$500,42,0)=0,"",VLOOKUP(DATA!$B$6,Info!$F$5:$EC$500,42,0))

  10. #10
    Forum Contributor
    Join Date
    05-13-2006
    Location
    League City, TX
    MS-Off Ver
    2010
    Posts
    139

    Re: vlookup not returning proper value

    thx I'll give that a try.
    thx again ya are the best

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: vlookup not returning proper value

    It's probably easier on calculation times to use the option to hide zeros rather than run the VLOOKUP twice

  12. #12
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: vlookup not returning proper value

    That's why I said "if that's truly what you want". ;-)

  13. #13
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: vlookup not returning proper value

    Quote Originally Posted by Cutter View Post
    That's why I said "if that's truly what you want". ;-)
    Yes but you didn't explain the alternative

+ 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