+ Reply to Thread
Results 1 to 7 of 7

To find nearest biggest number

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    To find nearest biggest number

    Hi,

    I have the following numbers

    A1=5, B1=15, C1=7, D1=32, E1=23


    I need to find the nearest biggest number of A1, in this case the result would be '7'.

    Please guide me using formula instead of macro.

    Thank you so much.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: To find nearest biggest number

    hi gan_xl. try:
    =MIN(INDEX((B1:E1>=A1)*B1:E1,))

    Edit: nah, that won't work
    =SMALL(INDEX((B1:E1>=A1)*B1:E1,),1+COUNTIF(B1:E1,"<"&A1))
    Last edited by benishiryo; 10-10-2013 at 06:59 AM.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: To find nearest biggest number

    =MIN(IF(B1:E1>A1,B1:E1,10000))

    as an array formula (confirm with ctrl+shift+enter)

  4. #4
    Valued Forum Contributor TheCman81's Avatar
    Join Date
    11-06-2012
    Location
    Edinburgh, UK
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    346

    Re: To find nearest biggest number

    You can use the following array formula Ctrl Shift Enter

    =SMALL(MIN(IF($B$1:$E$1>A1,$B$1:$E$1)),1)
    Excel Guru in the making

    <----------If the question has been answered to your satisfication please click the Add Repuation star to the left

  5. #5
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: To find nearest biggest number

    array formula (Ctrl +Shift+Enter)
    {=A1+MIN(IF($A$1:$E$1>A1,$A$1:$E$1-A1))}

    try another valuel and see the result

  6. #6
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    Re: To find nearest biggest number

    Thanks all. it works great.

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: To find nearest biggest number

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED",as per our Forum Rule #9. I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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] Rounding the number produced by an evaluated expression to the nearest number in CF
    By orly_sm in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-29-2013, 09:16 AM
  2. Help Me to find biggest value
    By deepanc in forum Excel General
    Replies: 4
    Last Post: 01-22-2013, 12:15 PM
  3. [SOLVED] Never pastes in right line. Nearest number to number in a given cell.
    By Wales MB in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-29-2012, 01:45 PM
  4. Look for biggest number minus next largest
    By Sir08 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-25-2008, 03:35 AM
  5. Finding a name with biggest number
    By Handyy in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-06-2006, 08:15 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