Solved

group by months

Posted on 2014-12-17
3
46 Views
Last Modified: 2014-12-22
i have attached a sample workbook.I work like to have a formula/vba that would extract the top 20 totals  for each group.
thanks
top20.xlsb
0
Comment
Question by:Svgmassive
  • 2
3 Comments
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst earned 500 total points
ID: 40506294
Hello,

put the numbers from 1 to 20 into cells E2 to E21. Copy down so you have these 20 numbers for each group.

Put the dates next to that, starting in F2. Then you can use this array formula in G2

=LARGE(IF($A$1:$A$773=F2,$C$1:$C$773,0),E2)

You need to confirm with Ctrl-Shift-Enter. Then copy down.

screenshot
cheers, teylyn
0
 
LVL 22

Expert Comment

by:yo_bee
ID: 40506300
You can leverage Pivot Tables.
I have attached your data in a pivot table. sheet 2

top20.xlsb
0
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst
ID: 40506424
yo bee, while a pivot table can be filtered to show top x values, the one you posted does not apply this technique. Where are the top 20? A pivot will not work here, I think, because it will also add the data from the same day, so the 20 highest values of the month cannot be shown.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now