I am trying to update values entered into cells in Column A. I have the following script which works as expected, almost. It updates the cell, but then continues to update until it reaches an exponentially large number.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
intcolumn = Target.Column
introw = Target.Row
Cells(introw, intcolumn) = Cells(introw, intcolumn) * "12"
End If
End Sub
Is there a way to make it so that I can make it so I can enter any number in A? and have it only multiply by 12 once? (1 = 12, 2 = 24, 3 = 36, 4 = 48, etc.)
Your change is triggering the Worksheet_Change event again. You need to have some kind of flag to keep track of it: