+ Reply to Thread
Results 1 to 6 of 6

Formula to find 3 closest values in a column when given one value

  1. #1
    Registered User
    Join Date
    04-03-2014
    Location
    Greeley, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    9

    Formula to find 3 closest values in a column when given one value

    Hey guys,

    I am trying to put together a formula to find the 3 best matches when I input a value into a cell.

    I would like to put a rotor OD value in a cell then have it find the three best matching stator ID's with a tolerance of +0.010 and -0.005.

    What kind of formula would I need and how could I put it together? I have attached a spreadsheet of a sample of what I'm trying to put together.
    Attached Files Attached Files

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula to find 3 closest values in a column when given one value

    Not sure if this is what you want as your description provides minimum information.
    Please see attached file.
    Attached Files Attached Files
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Contributor
    Join Date
    01-25-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    434

    Re: Formula to find 3 closest values in a column when given one value

    Hey Brennen

    With the example value you entered, 4.007
    I got the following answer Z7D1071866, Z7D885926, Z7D885923

    Here's the steps I took

    Column F
    - used to test whether each Stator is within the tolerances you stated

    Column G
    - used to rank all the Stators that are within range

    Column C
    - used to display 1,2 or 3 for the best 3 matches
    - also needed to be left of the Stator S.N. for lookup function

    J3
    - used to display the top 3 S.N.'s
    Please Login or Register  to view this content.
    ( you may wish to separate these into individual columns )

    This method can only work if you are testing values one by one, this method cannot work if you wanted to list a number of values you want to test
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    01-25-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    434

    Re: Formula to find 3 closest values in a column when given one value

    I think I was getting mixed up with Rotor's and Stator's, so it may not have been looking at the correct list

    If my method is close to what you was originally look for I'll make the necessary changes

  5. #5
    Forum Contributor
    Join Date
    01-25-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    434

    Re: Formula to find 3 closest values in a column when given one value

    Corrected an error in one of the formulas used for ranking
    Attached Files Attached Files

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Formula to find 3 closest values in a column when given one value

    See the attachement
    Attached Files Attached Files

+ 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 closest values to a given value?
    By SneakyPiglet in forum Excel General
    Replies: 4
    Last Post: 04-23-2013, 08:49 AM
  2. [SOLVED] Find Closest Date In Column
    By mcjack711 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2013, 02:37 PM
  3. 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
  4. Find two closest values that are higher
    By calebm12 in forum Excel General
    Replies: 11
    Last Post: 06-30-2009, 10:28 AM
  5. [SOLVED] How do I find a column entry closest to a particular value
    By feman007 in forum Excel General
    Replies: 1
    Last Post: 03-08-2005, 07:06 PM

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