excel vba updating cell value formula in cell not code example
Example: vba set cell value
Range("A2").Value = 1
Cells(2,1).Value = 1
Range("A2:A5").Value = 1 ' all cells in the range
Range("A2").Value = 1
Cells(2,1).Value = 1
Range("A2:A5").Value = 1 ' all cells in the range