I'm sure everyone is tired of my posts ?
Working on a column that is ever changing is really testing me.
Back to this -
This is my code
What is the best way to copy the last cell on row 3 and copy it all the way down to the last row? Does that even make sense?
Thanks
Working on a column that is ever changing is really testing me.
Back to this -
Copy of Area 84 IND Sept-October.xlsm | |||||||||
---|---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | H | |||
1 | |||||||||
2 | 600336A3 | 600336PL | 600336SSIFU | 600336SSIVD | 600336VIQS | 601036F | Total | ||
3 | 8 | 5 | 7 | 3 | 0 | 6 | 23 | ||
4 | 1 | 1 | 0 | 1 | 0 | 0 | |||
5 | 2 | 2 | 0 | 1 | 0 | 0 | |||
6 | 4 | 2 | 0 | 0 | 0 | 0 | |||
7 | 1 | 2 | 0 | 1 | 0 | 1 | |||
8 | 1 | 3 | 0 | 0 | 0 | 0 | |||
9 | 1 | 0 | 0 | 1 | 1 | 1 | |||
10 | 0 | 4 | 3 | 1 | 1 | 2 | |||
11 | 0 | 2 | 0 | 0 | 0 | 0 | |||
12 | 0 | 0 | 6 | 0 | 0 | 1 | |||
13 | 0 | 0 | 1 | 0 | 2 | 1 | |||
14 | 0 | 0 | 0 | 1 | 0 | 1 | |||
15 | 0 | 0 | 0 | 2 | 0 | 0 | |||
report |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B3:G15 | B3 | =COUNTIFS(data!$H:$H,$A3,data!$A:$A,B$2) |
H3 | H3 | =SUM($B3:F3) |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
data!_FilterDatabase | =data!$A$3:$AI$3 | B3:G15 |
This is my code
VBA Code:
Dim Lrw As Long, lcol As Long
Dim rng As Range
Set rng = Range("A2")
Lrw = Cells(Rows.Count, "B").End(xlUp).Row
lcol = Cells(2, Columns.Count).End(xlToLeft).Column
Range("B3", Cells(Lrw, lcol)).FillRight
rng.Offset(0, lcol).Value = "Total"
rng.Offset(1, lcol - 1).FormulaR1C1 = "=sum(rc2:rc[-1])"
What is the best way to copy the last cell on row 3 and copy it all the way down to the last row? Does that even make sense?
Thanks