Automate Formula script

  • Thread starter Thread starter Jeremy
  • Start date Start date
J

Jeremy

I am looking for a way to use script to say if there is data in A place
=B1+C1 in D of the same row.
 
Sub formularizer()
For Each r In Intersect(ActiveSheet.UsedRange, Range("A:A"))
If IsEmpty(r) Then
Else
n = r.Row
r.Offset(0, 3).Formula = "=B" & n & "+C" & n
End If
Next
End Sub
 
Would this go in the sheet code?

These are the actual formulas I am using
=A55-WEEKDAY(A55,2)+1
=A55-DAY(A55)+1

Thank you
 
For your initial query.

Range("D1:D10").Formula = "=IF(A1<>"""",B1+C1,"""")"

If this post helps click Yes
 
Back
Top