Closed Thread
Results 1 to 2 of 2

Find nearest previous date for a date & given value combination

  1. #1
    Registered User
    Join Date
    02-28-2018
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    6

    Find nearest previous date for a date & given value combination

    What I am trying to do is the following.

    I have a range of items that are sampled multiple times over a week and possibly more than once a day. I need a function (not a script since there will be too much endless computing in that way) that will look at the ID (Column A) and the Timestamp (Column D - Date and time) and look through all the data to find the corresponding ID with the previous nearest timestamp to be shown on the given line (say line 1) in column E1. E being the output of the desired equation.

    For instance:
    A - D E
    ID1 2017-11-14 5:20 "no previous"
    ID2 2017-11-14 5:25 "no previous"
    ID3 2017-11-14 5:25 "no previous"
    ID3 2017-11-14 5:30 "no previous"
    ID1 2017-11-15 6:20 2017-11-14 5:20

    The amount of rows will be ever expanding (timestamps) but the amount of unique IDs (column A) will be limited and be repeated.

    And so on. Any ideas?

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    41,471

    Re: Find nearest previous date for a date & given value combination

    Please read the forum rules. You are allowed one thread per query. Please continue in your original thread: https://www.excelforum.com/excel-for...mbination.html
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Find nearest previous date for a date & given value combination
    By Jules1414 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-28-2018, 09:42 AM
  2. To compare & find out the nearest date in the range with a common date
    By rkulasekaran in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-04-2015, 08:08 AM
  3. [SOLVED] find nearest last date from tody date
    By shoot for moon in forum Excel General
    Replies: 5
    Last Post: 07-18-2015, 06:25 PM
  4. [SOLVED] Find the Exact date, Nearest old and new date for the given input Letter) and date
    By thilag in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-17-2015, 05:13 AM
  5. Replies: 0
    Last Post: 05-30-2013, 07:50 PM
  6. Find nearest available date that meets criteria
    By scottylad2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-16-2013, 03:17 PM
  7. How to find nearest date to that of given
    By TRJJK73 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-16-2008, 06:30 PM

Tags for this Thread

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