http://ww.www.myelesson.org See how to use the subtotal formula in Excel. This video shows in details
1 How to sort data CTRL+ D+S
2 How to apply Subtotal CTRL+D+B
3 How to copy a subtotal result
4 How to add more criterion to Subtotal like Average, Count, Min,Max,etc
5 How to remove Subtotal
Insert subtotals in a list of data in a worksheet
When you insert subtotals:
Subtotals are calculated with a summary function, such as Sum or Average, by using the SUBTOTAL function. You can display more than one type of summary function for each column.
Grand totals are derived from detail data, not from the values in the subtotals. For example, if you use the Average summary function, the grand total row displays an average of all of the detail rows in the list, not an average of the values in the subtotal rows.
If the workbook is set to automatically calculate formulas, the Subtotal command recalculates subtotal and grand total values automatically as you edit the detail data. The Subtotal command also outlines the list so that you can display and hide the detail rows for each subtotal.