?
Solved

Finding the nth smallest number in a range, discounting duplicates

Posted on 2011-10-19
6
Medium Priority
?
354 Views
Last Modified: 2012-05-12
I used to know how to do this I think, but I can't find it anywhere. I need something as simple as possible that when I drag it down, each succeeding row gives me the next smallest unique number in the range [PercentsAll].

In other words if the lowest number is 92.53%, and there are 3 such occurrences, I can't have "=SMALL(PercentsAll,ROW(A2))" return 92.53%. I need it to return the next lowest unique number 93.15%

The method I used to know involved a fairly complicated formula, so I'm hoping there's a simpler one out there.

Thanks!

John
=SMALL(PercentsAll,ROW(A1))
=SMALL(PercentsAll,ROW(A2))
=SMALL(PercentsAll,ROW(A3))

Open in new window

0
Comment
Question by:gabrielPennyback
  • 3
  • 2
6 Comments
 
LVL 50

Expert Comment

by:barry houdini
ID: 36996398
Try using this formula in the first cell, e.g. in C2

=MIN(PercentsAll)

Then in C3 use this array formula confirmed with CTRL+SHIFT+ENTER and copied down

=MIN(IF(PercentsAll>C3,PercentsAll))

regards, barry
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 2000 total points
ID: 36996434
Sorry, the formula for C3 should refer to the cell above, C2, not C3, like this

=MIN(IF(PercentsAll>C3,PercentsAll))

See attached

regards, barry
27405556.xls
0
 
LVL 11

Expert Comment

by:ScriptAddict
ID: 36996452
If this is a manual process I would

Take the numbers your interested in an filter the list by unique records.  

Then I would just sort it ascending or decending.  

If you need a complex formula to do it, just let me know.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 11

Expert Comment

by:ScriptAddict
ID: 36996465
You would filter the list by unique records by selecting data, then in the filter section advanced, then check the unique records box.
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 36996490
An improvement to my suggestion...

Use this formula for a count of the different values

=SUMPRODUCT((A2:A50<>"")/COUNTIF(A2:A50,A2:A50&""))

then the formula to list the unique values from smallest to largest can be amended so that it can be copied down further than you need, extra cells will be blank - revised formula in D3 copied down

=IF(C$2>ROWS(D$3:D3),MIN(IF(PercentsAll>D2,PercentsAll)),"")

regards, barry
27405556v2.xls
0
 
LVL 1

Author Closing Comment

by:gabrielPennyback
ID: 36996817
This is perfect, thanks, Barry. And I love how simple it is. :-)

- John
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question