✔ 最佳答案
Suggest to use the Pivot Table feature:
1. Add a header row A1:B1 – Company, Value;
2. Add a new leftmost column with header Group, assign 1 for the first 3 companies, 2 for the next 2 companies;
3. Remove the empty row between the 2 groups as data list has to be contiguous;
4. Add a new column for Group Value next to Value;
5. Now the data list lies in A1:D6 (A1:D1 is header, A2:D6 is data), insert Pivot Table;
6. Put Group Value in “Column Labels”, Group Value and Group in “Row Labels”, Sum of Values in “Values”;
7. Change the sequence of Rows and Columns by changing the “more Sort options” to obtain the desire report.
2015-03-25 20:18:41 補充:
4. Add a new column for Group Value next to Value, put in cell D2 this formula =sumif(A$2:A$6,A2,C$2:C$6) and copy to D3:D6;
2015-03-26 10:36:30 補充:
If a simple sorted list is required, just sort the data list after step 4, data sort levels:
Level 1: Group Value - descending
Level 2: Group (separate different groups having same Group Value) - can be ascending or descending
Level 3: Value - descending