Posted to microsoft.public.excel.programming
|
|
Macro that adds all numbers that have formulas
If you mean to add up ONLY cells with formulas, try this.
Sub addupifformulas()
mc = 3 'col C
lr = Cells(Rows.Count, mc).End(xlUp).Row
For i = 1 To lr
If Cells(i, mc).HasFormula Then
ms = ms + Cells(i, mc)
End If
Next i
'MsgBox ms
Cells(lr + 2, mc) = ms
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"jjnotme" wrote in message
...
I have a worksheet that contains formulas in column C. I need a macro
that will add the results of the formaulas. The result should be
entered 2 lines after the data. This will be in liew of doing
subtotals.
I could use some help with this
Thanks, Carol
|