View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
smartin smartin is offline
external usenet poster
 
Posts: 915
Default Group/Sort records in Excel

Curious wrote:
Yes, I use comma as column separator.
How can I separate the Class and AccountName automatically in the
Excel?

Also, what command shall I use in order to add up the Shares for the
same Security on the same Side within the same Class?


You can use text-to-columns to separate the data.

Your original data looks like this:
Class_AccountName,Security,Side,Shares

Use text-to-columns with a comma (,) as delimiter to get this:
Class_AccountName Security Side Shares

Then text-to-columns once more with underscore (_) as delimiter to get this:
Class AccountName Security Side Shares


To get the sums I think your best bet is to use a pivot table as this
will produce all the subtotals at once. If you are not familiar with
pivot tables googling should reveal many good primers.