Using a macro to populate a cell with a formula
Dim rng as Range, sForm as String
Dim sStr as String
set rng = Intersect(ActiveSheet.UsedRange, _
Columns(5)).specialCells(xlBlanks)
sStr = rng(1).row
sForm = "=if(A" & sStr & "="""",C" & sStr _
& "+D" & sStr & ","""")"
rng.Formula = sForm
--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
.. .
Dim rng as Range
set rng = Intersect(ActiveSheet.UsedRange,Columns(1))
rng.offset(0,4).Formula = "=if(A1="""",C1+D1,"""")"
--
Regards,
Tom Ogilvy
"Steve" wrote in message
...
Hi
I would like to populate column E with a formula (column C
+ column D) where the the value of Column A is null.
Is this possible ?
Thank you in advance
Steve
|