I am struggling to find any solution to my specific need online. I am tying to find the correct syntax to do the following:
I want to create a macro that increases the value in one cell (W9) by 25 providing it doesn't go over the value in another cell (W7).
I then want to create a second macro to decrease the value in one cell (W9) by 25 until it reaches 1.
Here is what I was thinking - not sure if I'm on the right track or not but I can't seem to find the right syntax to deliver any results other than an error:
If Range("W7").Value > (Range("W9").Value+25) Then
Range("W9").Value = Range("W9")+25)
ElseIf Range("W7").Value < (Range("W9").Value+25) Then
End If
End Sub
I want to create a macro that increases the value in one cell (W9) by 25 providing it doesn't go over the value in another cell (W7).
I then want to create a second macro to decrease the value in one cell (W9) by 25 until it reaches 1.
Here is what I was thinking - not sure if I'm on the right track or not but I can't seem to find the right syntax to deliver any results other than an error:
If Range("W7").Value > (Range("W9").Value+25) Then
Range("W9").Value = Range("W9")+25)
ElseIf Range("W7").Value < (Range("W9").Value+25) Then
End If
End Sub