The Formula property

The Formula property represents the formula in a cell. This is a read-write property, so you can access it to insert a formula into a cell. For example, the following statement enters a SUM formula into cell A13:

Range("A13").Formula = "=SUM(A1:A12)"

Notice that the formula is a text string and is enclosed in quotation marks. If you are using the Formula property to determine the formula already in a cell and the cell doesn't have a formula, the Formula property returns the cell's Value property.

0 0

Post a comment