Sheet to sheet query

fparker61

New Member
Joined
Apr 26, 2017
Messages
29
I have a sheet that has all of the data I am working with. Based on 3 columns I want to get into another sheet the top 5 rows.

I am able to get the columns I want and sort them but I only want the top 5.

Thoughts on doing this without VBA? MS Query is giving me an error when I try to edit the query.
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Toadstool

Well-known Member
Joined
Mar 5, 2018
Messages
1,276
Office Version
  1. 2016
Platform
  1. Windows
Hi FParker61,

This only shows 5 entries so if the last of the 5 has a duplicate value then you won't see it.

FParker61.xlsx
ABCDEFG
1FigurinesCollectorStateNumberTop 5 CollectorsState
232JohnCA44BertNY
311SarahUT32JohnCA
444BertNY32VanessaCO
512CharlesNY27HarryCA
632VanessaCO12CharlesNY
727HarryCA
811JillUT
92JohnCO
101WilliamCO
Sheet1
Cell Formulas
RangeFormula
E2:E6E2=IF(A2="","",AGGREGATE(14,6,$A$2:$A$9999,ROW()-ROW($E$1)))
F2:G6F2=IF(ISNUMBER($E2),INDEX(B$2:B$9999,AGGREGATE(15,6,ROW($B$2:$B$9999)-ROW($B$1)/(($A$2:$A$9999=$E2)),COUNTIF($E$2:$E2,$E2))),"")
 

Watch MrExcel Video

Forum statistics

Threads
1,122,193
Messages
5,594,774
Members
413,934
Latest member
austinb

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
Top