+ Reply to Thread
Results 1 to 4 of 4

Vlookup date and time issue

  1. #1
    Registered User
    Join Date
    05-11-2015
    Location
    Bowral, NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    15

    Vlookup date and time issue

    Hi experts

    I am slowly working through my sheet problem. The stumbling block I am now on is this:

    I would like to lookup and display entries in a row of data using the date. However, the first column with the date in it also stores the time next to it, like this:

    dd/mm/yyyy hh:mm

    I can use a vlookup as follows: =VLOOKUP(DATEVALUE("05/04/2015"),C12:K110,4,FALSE) and when the entry was exactly at midnight, 12:00:00am (very rare but a few samples were done bang on midnight) will give me the result.

    I am wondering there is a way for the VLOOKUP to disregard the time, and only look for relevant dates. As I have a lot of entries each with totally random times.
    Thankyou for any help, I have been looking all over this site like crazy the last couple of days, its fantastic!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Vlookup date and time issue

    Try this...

    =INDEX(C12:K110,MATCH("05/04/2015",INDEX(TEXT(C12:C110,"dd/mm/yyyy"),),0),4)


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    05-11-2015
    Location
    Bowral, NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Vlookup date and time issue

    Hey man thanks a lot. Your fix is awesome and worked straight away.

    I actually kinda worked it out just as you posted - except I just dropped the ",FALSE" off the end of the VLOOKUP and it worked by finding the nearest entry, and if there was more than two entries on the day it now averages them out.

    Thanks so much !

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Vlookup date and time issue

    Quote Originally Posted by Mitch199 View Post
    I just dropped the ",FALSE" off the end of the VLOOKUP and it worked by finding the nearest entry
    Approximate match is not very reliable in getting the exact result

+ 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] Date & Time issue
    By ScabbyDog in forum Excel General
    Replies: 6
    Last Post: 12-13-2014, 07:35 PM
  2. [SOLVED] Date/Time Macro Issue
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-18-2014, 06:11 AM
  3. [SOLVED] Issue with vlookup when data has time stamp
    By Grimace in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-02-2013, 01:31 AM
  4. Date/Time Reference Issue
    By jakesing in forum Excel General
    Replies: 6
    Last Post: 05-10-2012, 08:35 PM
  5. Date time issue
    By Flash in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2006, 08:05 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