Here's a code I came up with. It works pretty good. The downside of this code is that the formula gets replaced with a value. I'd like the formula to stay intact
![]()
Private Sub CommandButton1_Click() If Range("Z1") = "" Then For Each Cell In Range("A1:E4") Cell.Value = Cell.Value / 40 Next Cell Range("Z1") = "Test" Else For Each Cell In Range("A1:E4") Cell.Value = Cell.Value * 40 Next Cell Range("Z1") = "" End If End Sub
Bookmarks