Steve,
First, I want to apologize to Tom for jumping in - my newsreader showed your
post as not being answered when I first replied.
And I'm not sure exactly what you want, so try these macros: The first fills
in the blanks of column E, and the second and third fill in column E where A
is blank, with different formulas.
Sub Steve2()
Intersect(Range("E:E"), ActiveSheet.UsedRange). _
SpecialCells(xlCellTypeBlanks).FormulaR1C1 = _
"=IF(RC[-4]="""",RC[-2]+RC[-1],"""")"
End Sub
Sub Steve3()
Intersect(Range("A:A"), ActiveSheet.UsedRange). _
SpecialCells(xlCellTypeBlanks).Offset(0, 4).FormulaR1C1 = _
"=RC[-2]+RC[-1]"
End Sub
Sub Steve4()
Intersect(Range("A:A"), ActiveSheet.UsedRange). _
SpecialCells(xlCellTypeBlanks).Offset(0, 4).FormulaR1C1 = _
"=RC[-2]+RC[-1]"
End Sub
HTH,
Bernie
MS Excel MVP
Hi Bernie
This is similar to what Tom suggested, however, I still
get a problem in so far as it completely overwrites other
data that was already in column E (i.e. where column A was
not null). Is there anyway around this ?
Thanks
-----Original Message-----
Steve,
The most simple solution is to include the null condition in the formula:
Sub Steve()
Intersect(Range("E:E"),
ActiveSheet.UsedRange).FormulaR1C1 = _
"=IF(RC[-4]="""",RC[-2]+RC[-1],"""")"
End Sub
HTH,
Bernie
MS Excel MVP
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
.