I want to put a value in a single cell - A1 is going to be (say) 5.
Sub Macro()
Cells(1, 1) = "5"
End Sub
Now, if A1 already contains the value 5 I want to change it to (say) 0 using the same macro.
Sub Macro()
Cells(1, 1) = "5"
If Cells(1, 1) = 5 Then
Cells(1, 1) = 0
End If
End Sub
Clearly doesn't work as the value 0 is always returned.
I want to link the Macro to a button such that the first click returns 5, click again returns 0, click again returns 5, and so on.....
How can I do this please ?
Bookmarks