Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting and grouping list totals
"Jim Thomlinson" wrote in message ...
This can be easily accomplished with a pivot table. Place the cursor anywhere in the middle of the data you want to consolidate. Choose Data -Pivot Table. Choose Finish (9 times out of 10 it will make all of the right assumptions for you.) Drag the "Code" to the right Column. Drag the Value to the Middle. The country can be plced in a few different spots depending exactly what you want. Experiment a little.... Pivot tables are kinda fun and really powerful. Jim, That works a treat - many thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Grouping and sorting | Excel Discussion (Misc queries) | |||
Grouping totals together by month per customer | Excel Discussion (Misc queries) | |||
Grouping Totals | Excel Discussion (Misc queries) | |||
Grouping Cells / Sorting | Excel Discussion (Misc queries) | |||
Grouping & Group Totals | Excel Worksheet Functions |