+ Reply to Thread
Results 1 to 2 of 2

first smallest and second smallest value dependent on a condition

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

    first smallest and second smallest value dependent on a condition

    Hello,

    I have a range of values as below:

    3489
    3489
    2345
    5600
    3200
    7800
    2345
    12000
    3200
    3200
    3489

    I need a formula to find the 1st smallest value (I use small(range,1) to get this) and the 2nd smallest value that is closest to the difference of 3000

    for the example above, the smallest value would be 2345 and the second smallest value that meets the condition would be 5600

    let me know if you need further information and thanks for your help in advance.

    Viren

  2. #2
    Registered User
    Join Date
    01-09-2014
    Location
    Leeds, England
    MS-Off Ver
    Excel 365
    Posts
    72

    Re: first smallest and second smallest value dependent on a condition

    Assuming your values are in A1:A11, enter this by pressing CTRL, SHIFT and ENTER to get an array formula.

    =IF(ABS(C1+3000-MIN(IF(A1:A11>=C1+3000,A1:A11)))<ABS(C1+3000-MAX(IF(A1:A11<=C1+3000,A1:A11))),MIN(IF(A1:A11>=C1+3000,A1:A11)),MAX(IF(A1:A11<=C1+3000,A1:A11)))

+ 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] Smallest value for conditions
    By zarize92 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-19-2018, 06:05 AM
  2. [SOLVED] Smallest value that is still greater than zero
    By marttikoo in forum Excel General
    Replies: 2
    Last Post: 11-08-2012, 11:57 AM
  3. Adding smallest value + second smallest value until exceeding a specific value
    By ployo60 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-22-2012, 07:25 AM
  4. Smallest value
    By aliyaser in forum Excel General
    Replies: 3
    Last Post: 08-22-2011, 10:26 AM
  5. Smallest number > 0
    By 1cellshort in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 03-01-2009, 12:53 AM
  6. [SOLVED] next smallest
    By Chickalett in forum Excel General
    Replies: 0
    Last Post: 03-15-2006, 08:35 PM
  7. smallest
    By jan jan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-14-2005, 10:06 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