Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2005

Tip: Looking for answers? Try searching our database.

Tricky - sort within a sort, assistance required please

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Neil - 14 Sep 2005 10:13 GMT
Hi All,

I have a tricky excel macro opportunity.....

My sheet(s) consist of sales data for a number of companies, populating
columns A through to O.

Column A lists company names.
Column M lists Sales $ achieved.

Within column A, there may be a group of identical entries (company names)
that are differentiated somewhere else in the sheet.

What I would like to do is sort by group of companies first, so the group of
like named companies in column A with the greatest
aggregate total of sales in column M should be listed at the top of the
sorted list then each of the comanies within the group should then
be sorted by Sales $, column M.

ie. for columns A & M

CCC $34
CCC $26
CCC $21
CCC $19
PP $ 89
BB $75
BB$6

The CCC group of companies has a total Sales $ of 100, hence is listed
first.
The company PP has a total of $89 hence is listed second.
Company BB totals $81 so is listed third.

Make sense ???

I appreciate the groups responses,

Thanks,

Neil
Bob Phillips - 14 Sep 2005 11:33 GMT
You need to create a column that calculates the total for each company, and
use that in the sort.

Maybe in N1

=SUMIF(A:A,A1,M:M)

an d copy down

Signature

HTH

Bob Phillips

> Hi All,
>
[quoted text clipped - 37 lines]
>
> Neil
Neil - 14 Sep 2005 12:29 GMT
Excellent Bob,

Another good example of using a helper cell (column)

Thanks,

Neil

> You need to create a column that calculates the total for each company,
> and
[quoted text clipped - 49 lines]
>>
>> Neil
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.