Mega Code Archive
Categories
/
VisualBasic Script
/
Excel
Fill formula to cell
Sub AddWatch() With Application .Range("A1").Formula = 1 .Range("A2").Formula = 2 .Range("A3").Formula = "=Sum(A1:A2)" .Range("A3").Select .Watches.Add Source:=ActiveCell End With End Sub