Currently am working on excel sheets in which I have to group a no. of columns which are having the same contents (from a sorted list) and just after the last column I have to insert a row for the subtotal. Alongwith that I have to insert the no. of columns with that content in that row.
For example
1 Salesman1 Item1 $20
2 Salesman1 Item2 $30
3 Salesman1 Item3 $50
—————————–
TOTAL 3 $100
4 Salesman2 Item4 $10
5 Salesman1 Item5 $25
6 Salesman1 Item6 $30
7 Salesman1 Item2 $15
—————————–
TOTAL 4 $80
Can anybody help me with a macro for this. Because, the sheet usually contains about 550-600 such groups, which I have to format like the above every 2 weeks. Many many thanks in advance