LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Group/Sort records in Excel

Hi,

I have the following in Excel. I'll need to add the "Shares" for each
"Security" by "Side" for each "Class".

Class_AccountName,Security,Side,Shares
------------------------------------
SmallCap_Account1,AA,Buy,1000
SmallCap_Account1,BB,Buy,1000
SmallCap_Account1,CC,Buy,1000
SmallCap_Account1,DD,Buy,1000
SmallCap_Account1,EE,Buy,1000
SmallCap_Account1,AA,Sell,1000
SmallCap_Account1,CC,Sell,1000
SmallCap_Account1,GG,Sell,1000
------------------------------------
SmallCap_Account2,AA,Buy,1000
SmallCap_Account2,CC,Buy,1000
SmallCap_Account2,DD,Buy,1000
SmallCap_Account2,AA,Sell,1000
SmallCap_Account2,BB,Sell,1000
------------------------------------
SmallCap_Account3,AA,Buy,1000
SmallCap_Account3,BB,Buy,1000
SmallCap_Account3,DD,Buy,1000
SmallCap_Account3,EE,Buy,1000
SmallCap_Account3,BB,Sell,1000
SmallCap_Account3,CC,Sell,1000
SmallCap_Account3,EE,Sell,1000
------------------------------------
MidCap_Acct1,AAA,Buy,1000
MidCap_Acct1,BBB,Buy,1000
MidCap_Acct1,CCC,Buy,1000
MidCap_Acct1,EEE,Buy,1000
MidCap_Acct1,AAA,Sell,1000
MidCap_Acct1,DDD,Sell,1000
MidCap_Acct1,EEE,Sell,1000
MidCap_Acct1,HHH,Sell,1000
MidCap_Acct1,XXX,Sell,1000
MidCap_Acct1,YYY,Sell,1000
------------------------------------
MidCap_Acct2,AAA,Buy,1000
MidCap_Acct2,CCC,Buy,1000
MidCap_Acct2,EEE,Buy,1000
MidCap_Acct2,GGG,Buy,1000
MidCap_Acct2,AAA,Sell,1000
MidCap_Acct2,EEE,Sell,1000
MidCap_Acct2,OOO,Sell,1000
MidCap_Acct2,XXX,Sell,1000
MidCap_Acct2,YYY,Sell,1000
------------------------------------

The ideal result for the example looks like the follows:

SmallCap:

AA,Buy,3000 (all of the shares for AA on Buy side are added in
SmallCap)
BB,Buy,2000
CC,Buy,2000
DD,Buy,3000
EE,Buy,2000
AA,Sell,2000 (all of the shares for AA on Sell side are added in
SmallCap)
BB,Sell,2000
CC,Sell,2000
EE,Sell,1000
GG,Sell,1000

MidCap:

AAA,Buy,2000 (all of the shares for AAA on Buy side are added in
MidCap)
BBB,Buy,1000
CCC,Buy,2000
EEE,Buy,2000
GGG,Buy,1000
AAA,Sell,2000 (all of the shares for AAA on Sell side are added in
MidCap)
DDD,Sell,1000
EEE,Sell,2000
HHH,Sell,1000
OOO,Sell,1000
XXX,Sell,2000
YYY,Sell,2000

Anyone can advise me on how to get the ideal results in Excel using
Excel commands?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
In excel files get saved a [Group], can't sort. Help! HROSEN Excel Discussion (Misc queries) 1 April 1st 09 09:44 PM
what is a group excel file and how do i disable so i can sort it? JR Excel Worksheet Functions 1 March 20th 08 02:45 PM
Excel subtotal group sort rick@bcbsne Excel Worksheet Functions 4 October 13th 05 12:31 AM
Excel should let me group rows of info and then sort them Dave Excel Worksheet Functions 0 August 31st 05 08:03 PM
How do I sort a group of calculated cells in Excel? Benny cannot figure otu the solution Excel Worksheet Functions 2 July 5th 05 08:55 PM


All times are GMT +1. The time now is 04:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"