+ Reply to Thread
Results 1 to 6 of 6

Looking for Lookup Formula Based On Nearest Number

  1. #1
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Looking for Lookup Formula Based On Nearest Number

    hi all...

    i have problem about how to lookup data based on nearest number or round number
    with criteria <.50 --rounddown or >=.50 --roundup

    for easy, please check my attachment file..

    for anyhelp help me, greatly appreciated..

    john m
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Looking for Lookup Formula Based On Nearest Number

    How do you determine that 101.0 (cell B10) should be in Cluster 1.2 and not 1.1?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: Looking for Lookup Formula Based On Nearest Number

    hi...

    cause 100.50 ---with decimal .50 so roundup to or nearest to 101.00
    criteria: if decimal <.50 ---rounddown or if decimal >=.50 ----roundup
    Last edited by AliGW; 03-31-2020 at 12:02 PM. Reason: Please don't quote unnecessarily!

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Looking for Lookup Formula Based On Nearest Number

    If i've understood what you're trying to do - I would be inclined to store the co-ordinates of the closest match, once, (having adjusted model values per rounding requirement), and then use the co-ordinates to return the cluster & model values, e.g.:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    per your sample this would generate 1.1 / Best, 1.2 / Best, 1.2 / Better, 1.2 / Worst ... and if you added say 168 as new row that would generate 2.1 / Better

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Looking for Lookup Formula Based On Nearest Number

    Please try at
    C9
    =LOOKUP(1,1/MMULT(--(MIN(ABS(B9-$B$3:$D$5))=ABS(B9-$B$3:$D$5)),TRANSPOSE(COLUMN($B$3:$D$5))^0),$A$3:$A$5)

    D9
    =LOOKUP(1,1/MMULT(TRANSPOSE(ROW($B$3:$D$5))^0,--(MIN(ABS(B9-$B$3:$D$5))=ABS(B9-$B$3:$D$5))),$B$2:$D$2)

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Attached Files Attached Files
    Last edited by Bo_Ry; 03-31-2020 at 12:14 PM. Reason: correction

  6. #6
    Forum Contributor
    Join Date
    01-22-2013
    Location
    Pekanbaru, Indonesia
    MS-Off Ver
    Excel 2013 & Google Sheet
    Posts
    1,146

    Re: Looking for Lookup Formula Based On Nearest Number

    thank guys..work perfect!!!

+ 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] Formula to put the number next to the nearest value in Column A
    By leprince2007 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 01-19-2020, 10:09 AM
  2. [SOLVED] Formula required to find the nth nearest number to a selected number
    By josephteh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-05-2019, 05:49 PM
  3. get nearest month/day/year that hasn't passed from two digit number with formula
    By 951Michael in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2017, 02:08 PM
  4. [SOLVED] Formula to split a number to nearest denominator
    By strud in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-29-2013, 07:39 AM
  5. Formula for Finding the Nearest Number
    By artiststevens in forum Excel General
    Replies: 5
    Last Post: 03-28-2011, 08:56 PM
  6. Formula for rounding number to nearest hundred?
    By rinkjustice in forum Excel General
    Replies: 5
    Last Post: 07-26-2006, 02:25 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