Saturday, 14 September 2013

How to enter a formula into a cell using VBA?

How to enter a formula into a cell using VBA?

I am trying to enter a formula into a cell which contains variable called
var1a? The code that I have is:
Worksheets("EmployeeCosts").Range("B" & var1a).Formula = ""SUM(H5:H""&
var1a)
But it enters into an excel worksheet with a mistake.

No comments:

Post a Comment