Hello,
I am trying to figure out if there's a way to use VBA to find subtotals based on two criteria. The data is already sorted by these two criteria (line number and department number) and I'd like to be able to draw a bottom border across the cells and put the subtotal on the last cell that this data appears on.
This data is dynamic.
Line Dept Sales Amount Total
13 Dept 1 Cookies 10
14 Dept 1 Cookies 10 $20
05 Dept 2 Beer 30 $30
06 Dept 3 Cookies 10
07 Dept 3 Cookies 10 $20
01 Dept 3 Wine 40
02 Dept 3 Wine 40
03 Dept 3 Wine 40 $120
I am trying to figure out if there's a way to use VBA to find subtotals based on two criteria. The data is already sorted by these two criteria (line number and department number) and I'd like to be able to draw a bottom border across the cells and put the subtotal on the last cell that this data appears on.
Line Dept Sales Amount Total
13 Dept 1 Cookies 10
14 Dept 1 Cookies 10 $20
05 Dept 2 Beer 30 $30
06 Dept 3 Cookies 10
07 Dept 3 Cookies 10 $20
01 Dept 3 Wine 40
02 Dept 3 Wine 40
03 Dept 3 Wine 40 $120