+ Reply to Thread
Results 1 to 3 of 3

How to find the closest match meeting conditions

  1. #1
    Registered User
    Join Date
    06-27-2011
    Location
    Australia
    MS-Off Ver
    Excel 2011
    Posts
    5

    Red face How to find the closest match meeting conditions

    I have a reference table comprising a column of dates in ascending order and a column of readings (numbers in no order). Each date has a corresponding reading eg 5Apr11 = 1000. In my worksheet I have an input date, tolerance and number eg 1Apr11, 5, 1007.

    For the inputted data, I would like to show the date corresponding to the closest number in the reference table that occurs after the input date and is within the +/- tolerance.

    What formula would achieve this?

    Thanks in advance for your reply.

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: How to find the closest match meeting conditions

    Hello glenn, Welcome to the forum!

    Would you please attach a sample file with expecting result?

    Scroll down & click Go Advanced then down click on Manage Attachment, browse the file & upload it.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to find the closest match meeting conditions

    Welcome to the Board.

    If we assume for sake of demo. that:

    Dates are in Col A
    Associated values are in Col B

    Min Date is C1
    Tolerance is D1
    Number is E1

    then to return the first date thereafter for which associated value is within tolerance of specified number:

    Please Login or Register  to view this content.
    Obviously modify ranges to meet own requirements but note that Arrays (array entry required as outlined) are inefficient and precedent ranges should be kept as lean as possible.

    Note: I have assumed the tolerance to be valid in either direction (tolerance of 5 equates to -5 to +5)

+ 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