Posted to microsoft.public.excel.programming
|
|
VBA Sum Non-Contiguous Columns
Set frng = Range("s2:s" & Cells(Rows.count, "s").End(xlUp).Row)
With frng
.Formula = "=p2+r2"
'uncomment next line to eliminate the formula
' .Formula = .Value
End With
--
Don Guillett
SalesAid Software
"Exceller" wrote in message
...
I'm looking for VBA code to sum columns P and R in column S (sheet 1).
So, cell P2 and R2 will be summed in S2; P3 and R3 summed in S3, and so
on.
Thanks!
Exceller
|