vba to update cell value 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