+ Reply to Thread
Results 1 to 5 of 5

Can I find the two closest adjacent data points in Excel?

  1. #1
    Registered User
    Join Date
    08-10-2015
    Location
    New Zealand
    MS-Off Ver
    2013
    Posts
    3

    Question Can I find the two closest adjacent data points in Excel?

    Hey all,

    I have multiple pages of data and I need to find the two adjacent rows on each page that have the smallest difference in them.

    E.g.
    0.41581
    0.46611
    0.39498
    0.58341
    0.57520
    0.42977
    0.54351
    0.64867
    0.50810
    0.49935
    0.62768
    0.60185
    0.54170
    0.61906
    0.46601
    0.58252
    0.51897
    0.54903
    0.55894
    0.56617
    0.56323
    0.51466
    0.27893
    0.66893
    0.66734
    0.56658
    0.51281
    0.62324
    0.66549
    0.76005
    0.74205
    0.62957
    0.66535
    0.62426
    0.57915
    0.50971

    I need to find the two closest adjacent numbers in this list (i.e. the two adjacent rows with the smallest difference). I have to do it 96 times so I am hoping and wishing that there is a formula for it. Graphing it all out and eyeballing the two closest points is getting tiresome fast ;-S

    Cheers

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Can I find the two closest adjacent data points in Excel?

    How about this.
    There is a calculation in C1 and Conditional formatting in A column.
    Attached Files Attached Files

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,819

    Re: Can I find the two closest adjacent data points in Excel?

    Are you likely to have two differences which are both minimum?

    Pete

  4. #4
    Registered User
    Join Date
    08-10-2015
    Location
    New Zealand
    MS-Off Ver
    2013
    Posts
    3

    Re: Can I find the two closest adjacent data points in Excel?

    No, not likely. But it could happen I suppose, but it would be a huge coincidence.

  5. #5
    Registered User
    Join Date
    08-10-2015
    Location
    New Zealand
    MS-Off Ver
    2013
    Posts
    3

    Re: Can I find the two closest adjacent data points in Excel?

    Nice, that looks like it should work. Thanks heaps!
    Are you able to explain it really briefly? I'm not quite a complete beginner at excel but I am pretty amateur..

+ 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] find the closest match to given latitude / longitude from data stored in 2 columns
    By florin_excel in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 10-24-2017, 04:54 AM
  2. [SOLVED] Find closest values and return adjacent values
    By John_B_Russell in forum Excel General
    Replies: 6
    Last Post: 03-28-2015, 01:33 AM
  3. What VBA code would accomplish this excel formula to find the closest # to another #
    By xcelnovice101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2014, 03:40 PM
  4. Find closest value from array data
    By max12 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-12-2013, 12:39 PM
  5. How to find closest values in multiple columns and return adjacent values.
    By Patrician in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-28-2013, 01:47 PM
  6. calculating points total, with formula to look above for closest item name
    By david1987 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-21-2012, 10:39 AM
  7. Find closest match unsorted data
    By Yappa in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 02-11-2010, 01: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