+ Reply to Thread
Results 1 to 6 of 6

VLOOKUP and Dates

  1. #1
    Registered User
    Join Date
    04-01-2010
    Location
    Chester-le-Street, England
    MS-Off Ver
    Excel 2016
    Posts
    83

    VLOOKUP and Dates

    I'm trying to get VLOOKUP to recognize / select a date from a column of dates arranged in chronological order (and return the corresponding value in another column). Problem: the function doesn't seem to want to recognise for example 28/6/2013 but only the same value in serial date number format (41453). I can add a column with the two formats side by side but the idea is to input and look up a date that means something, not a number!! I think in Quattro there was an @@ function that returned a referenced cell, which might have worked somehow, but trying around with OFFSET and INDIRECT hasn't brought a solution. I've a feeling that there's a solution staring me in the face but can anyone help with a wee bit lateral thinking?

  2. #2
    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,946

    Re: VLOOKUP and Dates

    wow I havnt heard about Qpro for ages (I cut my teeth on it lol)

    If your vlookup is not finding your fdate, then maybe its not a date, but text that looks like a date? For a quick test, use =isnumber(cell-ref) to see if it's a number (FALSE means it's text)

    Maybe upload a sample workbook for us to take a look at?
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

  3. #3
    Registered User
    Join Date
    04-01-2010
    Location
    Chester-le-Street, England
    MS-Off Ver
    Excel 2016
    Posts
    83

    Re: VLOOKUP and Dates

    Tks for the reply in nanoseconds!

    Briefly (cos it's getting late here) if I type literally 28/6/2013 in a cell Excel converts that (I understand) to a date number. Using isnumber on that cell returns true. But this input produces N/A from the function. My adjoining column has "=" followed by a reference to the cell in question, but I have then formatted the cell to show a number: 41453. VLOOKUP recognizes the reformatted cell (as it does if I manually type 41453 into the formula which was to be expected) but not the "human" date. It looks like VLOOKUP is fooled simply by the different format which surprises me. If this doesn't make sense please say and I can send a simple example as you suggest.

  4. #4
    Registered User
    Join Date
    04-01-2010
    Location
    Chester-le-Street, England
    MS-Off Ver
    Excel 2016
    Posts
    83

    Re: VLOOKUP and Dates

    I think the solution came whilst I was making a cup of tea. I get VLOOKUP to search for the serial number in a cell which is in tern connected to the "date" cell by "=". Easier to show than to explain but I wanted to avoid causing readers sleepless nights unnecessarily.
    If by tomorrow it fails I will revisit the forum!

  5. #5
    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,946

    Re: VLOOKUP and Dates

    I hope it works for you If not, upload the sample workbook

  6. #6
    Registered User
    Join Date
    04-01-2010
    Location
    Chester-le-Street, England
    MS-Off Ver
    Excel 2016
    Posts
    83

    Re: VLOOKUP and Dates

    Midnight oil seems to have done the trick. If come the morning the flaws begin to appear then it's nice to know that there's yourselves to call on!

+ 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