View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Curious[_3_] Curious[_3_] is offline
external usenet poster
 
Posts: 6
Default Sorting and grouping list totals

Morning,

I am looking for help with a macro that will enable me to process UK
intrastat information. Effectively the information will look like this

Column 1 Column 2 Column 3
1,000 101 NL
2,435 121 NL
2,565 121 DE
2,000 131 GB
2,500 101 NL

And I would like to be able to easily sort the output into the
following

Code Value Country
101 3,500 NL
121 2,435 NL
121 2,565 DE
131 2,500 GB

So in other words, each code is grouped together and totalled but
sorted and seperated by country code (column 3) - in the given
example, code 101 has two entries in the table, both from NL and
therefore are grouped as one but the 121 code has two entries but has
different country codes and therefore is seperated.

I hope that makes sense :)

Thanks to all in advance