kyrgan
Active Member
- Joined
- Mar 23, 2006
- Messages
- 309
Hello all,
I am using the following to create subtotals from a selection
I need to add a column with the sales percentage: the Net Sales (Column 7) divided by the Grand Total (Last Row, Column 7) as a formula in Column 8 [% of sales]. Or even the results of this calculation there.
With the preceding code, what is nice this is I get a final new row that shows the Grand Total.
What I would like to do is when there is a Net Sales value in column 7 , to insert the formula =(Net Sale / Grand Total ). There is rarely the same number of rows so the Grand Total is rarely on the same row.
I am using the following to create subtotals from a selection
Code:
Range("B3:N1000").Select
Selection.Subtotal GroupBy:=2, Function:=xlSum, _
TotalList:=Array(5, 6, 7)
ActiveSheet.Outline.ShowLevels RowLevels:=2
I need to add a column with the sales percentage: the Net Sales (Column 7) divided by the Grand Total (Last Row, Column 7) as a formula in Column 8 [% of sales]. Or even the results of this calculation there.
With the preceding code, what is nice this is I get a final new row that shows the Grand Total.
What I would like to do is when there is a Net Sales value in column 7 , to insert the formula =(Net Sale / Grand Total ). There is rarely the same number of rows so the Grand Total is rarely on the same row.