Results 1 to 4 of 4

find closest date (number) in a range

Threaded View

  1. #1
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    find closest date (number) in a range

    in short:
    I have a variable, holding a date
    What I hope to do, is search for the closest match to that variable in a range with different dates, stored in range a:a.
    (when found, I want to select that cell. )


    variable might for example be: 21.06.09 12:13

    ...............A
    1 18.02.09 12:34
    2 20.04.09 23:59
    3 22.06.09 13:00
    4 22.06.09 14:30

    then here it should select cell A3 since this is the closest value.

    any suggestions on how to achieve this?
    I've searched a bit, but can only find examples for sheet-formulas to achieve this.

    I assume I have to search for the numerical value of the date(s) in the range, compare them to my variable but alas, I have no idea how to do that :-/
    Last edited by wamp; 04-23-2010 at 01:43 PM. Reason: solved

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