G
Gord Dibben
I am stuck with VBA syntax.
A1 has value of 123
A2 is blank
A3 also has value of 123
In A4 need a SUM range of A3 only
If A1:A3 all have values then need SUM range of A1:A3
This is what I have now but does not do the variable trick.
Set rng3 = Range(ActiveCell.Offset(-1, 0), _
ActiveCell.Offset(-1,0).End(xlUp))
ActiveCell.Formula = "=Sum(" & rng3.Address & ")"
Gord
A1 has value of 123
A2 is blank
A3 also has value of 123
In A4 need a SUM range of A3 only
If A1:A3 all have values then need SUM range of A1:A3
This is what I have now but does not do the variable trick.
Set rng3 = Range(ActiveCell.Offset(-1, 0), _
ActiveCell.Offset(-1,0).End(xlUp))
ActiveCell.Formula = "=Sum(" & rng3.Address & ")"
Gord