+ Reply to Thread
Results 1 to 14 of 14

Need a formula/function to auto select MIN value from selected range.

  1. #1
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Need a formula/function to auto select MIN value from selected range.

    Hi Guys!

    I need a formula in attached file. in Cell B14 i have insert formula

    =SMALL(B3:B10,1)

    but it shows in one cell. I need a formula which will show less than 35% from the range B3:B10 multiple values in table.

    Hope you guys understand.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Need a formula/function to auto select MIN value from selected range.

    With If in formula


    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: Need a formula/function to auto select MIN value from selected range.

    ohh! Thank soooooo much.

  4. #4
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: Need a formula/function to auto select MIN value from selected range.

    Leo thank you so much for helping me. formula working best as i want it. but in next column i want to show name of that selected value i am using vlookup and index match. if i have

    A B
    1 Brown 50
    2 Red 50
    3 XYZ

    your formula selecting both 50 value but my vlookup and index match formula selecting Brown only.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,549

    Re: Need a formula/function to auto select MIN value from selected range.

    Try using this array formula* for the name:
    Please Login or Register  to view this content.
    ...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 is a copy of the file with the formula applied.
    Let me know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: Need a formula/function to auto select MIN value from selected range.

    -2 represents to?

  7. #7
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: Need a formula/function to auto select MIN value from selected range.

    if i have no data in cell b than its showing error

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,549

    Re: Need a formula/function to auto select MIN value from selected range.

    If you want to hide the error, wrap the array formula* in IFERROR(..., "") as in:
    Please Login or Register  to view this content.
    As to why the -2 it is used to get the ROW function to return 1,2...8 I could have used ROW(A$1:A$8) but chose to let Excel do the math rather than me. You can select C14, then from the Formulas tab select and run Evaluate Formula to see how Excel runs through the calculations.
    Let me know if you have any questions.

  9. #9
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: Need a formula/function to auto select MIN value from selected range.

    Thanks for guidance actually JeteM's formula working perfectly. I am talking about this formula

    Please Login or Register  to view this content.
    this formula also working fine but if A did not sell any product and his income cell is blank, than above mentioned formula show his performance within the range which i gave less than or equal to 35% something like <=35%&blank. Hope you guys understand.

  10. #10
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,292

    Re: Need a formula/function to auto select MIN value from selected range.

    I propose a way to solve the problem using the AGGREGATE function.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: Need a formula/function to auto select MIN value from selected range.

    thank you so much it works now the problem is in next column C where names will be showing according to B column. if i have more than two blank cells C column shows same name in both cells.
    Attached Files Attached Files

  12. #12
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Need a formula/function to auto select MIN value from selected range.

    Try this in C14:
    =IF(B14="","",INDEX(A$3:A$10,SMALL(IF($B$3:$B$10=B14,ROW($B$3:$B$10)-2,""),COUNTIF($B$14:B14,B14))))
    Enter with Ctrl+Shift+Enter

  13. #13
    Forum Contributor
    Join Date
    02-10-2016
    Location
    Karachi, Pakistan
    MS-Off Ver
    2016
    Posts
    173

    Re: Need a formula/function to auto select MIN value from selected range.

    thank you finally done. Thank you all dear....

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,188

    Re: Need a formula/function to auto select MIN value from selected range.

    Modified formula from Czeslaw:

    =IFERROR(AGGREGATE(15,6,B$3:B$10/(B$3:B$10<=E$4)/(B$3:B$10<>""),ROW(1:1)),"")

    If your question had been addressed, please mark thread as solved ("Thread Tools" at top of first post)

+ 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] Auto Bar Chart with selected range
    By Imran Magsi in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 02-25-2016, 07:54 AM
  2. How do you select the range next to your selected range?
    By max3732 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2014, 01:01 PM
  3. Newbie: Auto Select/un-Select an Range of Slicer Items
    By luckyali in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2014, 09:52 AM
  4. Select a Range of Cells Offset from a Selected Merged cell
    By kelvomatic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-07-2013, 05:52 PM
  5. How to select the last cell in a currently selected range
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-20-2011, 05:09 PM
  6. Replies: 1
    Last Post: 05-15-2006, 04:10 AM
  7. Compare a selected Range with a Named range and select cells that do not exist
    By PCLIVE in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2005, 03:05 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