Access Top 10

LTunnicliffe

Well-known Member
Joined
May 8, 2003
Messages
767
Is there away to grab the ten records with the highest value in a specific field? Kind of like Max, but Max10?

Thanks,
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Set up an ordinary select query using the fields you require, in the middle of the screen there is a 'Top Values' dropdown box, which should read 'All', click in it and type in 10, then run your query. In SQL, it would look similar to this-

SELECT TOP 10 tblResults.Source, tblResults.Result
FROM tblResults
 
Upvote 0
That is the world's worst defined box I have (n)ever seen. I guess I have always knew it was there but didn't know what it did. Even when looking for it, it took a while to find it. Anyway, thanks for your answer. How do I get this to work in conjunction with my Groups? That is how do I see the Top 10 "Cats", "Dogs", "Fish" by price?
 
Upvote 0
If you just want one "group" at a time, then filter your query on "Cats", and order the price ascending or descending (this would depend on if you want the lowest or highest prices, respectively) - then put the number you want in the dropdown (10 in your example).

If, however, you want to see the top X values of all your qroups at the same time, then you'll need to do something like this:

http://mrexcel.com/board2/viewtopic.php?t=48828

HTH,

Russell
 
Upvote 0

Forum statistics

Threads
1,221,539
Messages
6,160,412
Members
451,644
Latest member
hglymph

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top