+ Reply to Thread
Results 1 to 7 of 7

Find the closest numbers to a specific requirement.

  1. #1
    Registered User
    Join Date
    12-13-2010
    Location
    melbourne australia
    MS-Off Ver
    Excel 2016
    Posts
    58

    Find the closest numbers to a specific requirement.

    Hi,

    I have a range of values and require a formula to find the closest numbers on either side of 20 as below:

    0.0000000000
    2.2727272727
    2.2727272727
    6.5249990000
    6.5250000000
    11.9136353636
    11.9136363636
    17.3022717273
    17.3022727273
    22.6909080909
    22.6909090909
    28.0795444545
    28.0795454545


    so the lower bound closest to the 20 = 17.3022727273
    and upper bound closest to 20 = 22.6909080909

    thanks for your help.
    v

  2. #2
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: Find the closest numbers to a specific requirement.

    If your data in column A, try this

    the lower bound closest
    =AGGREGATE(14,6, A1:A100/(A1:A100<=20),1)

    upper bound closest
    =AGGREGATE(15,6, A1:A100/(A1:A100>=20),1)

  3. #3
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Find the closest numbers to a specific requirement.

    Or try lower:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and upper
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you are updated to Excel 2021 or Excel 365 you could also try:

    Lower:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Upper:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-13-2010
    Location
    melbourne australia
    MS-Off Ver
    Excel 2016
    Posts
    58

    Re: Find the closest numbers to a specific requirement.

    Thank you windknife and HansDouwe. Both solutions worked for me.

    Apreciate the quick and prompt response.

  5. #5
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: Find the closest numbers to a specific requirement.

    You are welcome.
    -----------------------------------
    If that takes care of your original question, please click on "Thread Tools" from the menu link above and mark this thread as SOLVED.

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Find the closest numbers to a specific requirement.

    You are Welcome.
    Thanks for your feedback, Glad to have helped. .

    If you haven't already, please consider adding reputation to all helpers you think they deserve.
    In that case please click * Add Reputation left below their answers.

  7. #7
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,361

    Re: Find the closest numbers to a specific requirement.

    If you had 365 you could also use XLOOKUP:

    Lower:
    Please Login or Register  to view this content.
    Higher:
    Please Login or Register  to view this content.
    If things don't change they stay the same

+ 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. Find a number closest to 1 of 9 numbers
    By oradba4u in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-16-2021, 05:11 PM
  2. Formula to find closest combination of numbers ...
    By 951Michael in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-21-2019, 04:09 PM
  3. [SOLVED] On error go to next find requirement
    By LoneReaper in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2017, 08:48 PM
  4. Replies: 0
    Last Post: 10-13-2013, 05:22 AM
  5. [SOLVED] Find the closest range of numbers and their cross values
    By Alexnf in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-15-2012, 04:12 AM
  6. Replies: 1
    Last Post: 03-05-2012, 01:26 PM
  7. [SOLVED] find closest match to a reference number in a row of numbers
    By Nick Krill in forum Excel General
    Replies: 4
    Last Post: 12-21-2005, 08:00 AM

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