+ Reply to Thread
Results 1 to 7 of 7

How to find a value in a column that is closest to a given value

  1. #1
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Red face How to find a value in a column that is closest to a given value

    Looking for the very simplest formula there is to do this with as I'll have to apply indirect function to it. So, as an example, if my value is 10, I want to find the closest value to it in a column below, which would be 11:

    20
    15
    18
    11
    8
    7

    Thanks!
    Last edited by luv2glyd; 09-10-2014 at 01:20 PM.
    You either quit or become really good at it. There are no other choices.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: How to find a value in a column that is closest to a given value

    Something like this, maybe:
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Re: How to find a value in a column that is closest to a given value

    Awesome! Thank you.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: How to find a value in a column that is closest to a given value

    You're welcome & thanks!!

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to find a value in a column that is closest to a given value

    If this was your data:

    20
    15
    18
    11
    9
    7

    What result would you expect? Both 9 and 11 are equally close.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: How to find a value in a column that is closest to a given value

    Tony, (for my education), how would you deal with this? I'd add/subtract a very small number to split tied decisions... How would you deal with it?

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to find a value in a column that is closest to a given value

    It all depends on the OP's requirement/data.

    They may want the closest that is less than the target value or the closest that is greater than the target value. Or, whichever closest appears first.

+ 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. Formula to find 3 closest values in a column when given one value
    By Brennen26 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-04-2014, 07:32 AM
  2. [SOLVED] Find Average, Return Column Header of Number Closest To Average
    By djmyers in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-07-2013, 04:19 PM
  3. [SOLVED] Find Closest Date In Column
    By mcjack711 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2013, 02:37 PM
  4. How do I find a column entry closest to a particular value
    By feman007 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-09-2005, 01:06 PM
  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