ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   a button to add 1 to a SPECIFIC cell (https://www.excelbanter.com/excel-programming/454186-button-add-1-specific-cell.html)

ChautauquaSun1

a button to add 1 to a SPECIFIC cell
 
I am sure this is a really easy one to answer. I am not a programmer and cant seem to figure out this macro formula Here is the formula I am using to add 1 every time I press a button. However what I realized is that it assigns the value to the cell that my cursor is in. I will be using 4 buttons and need to have the values show in specific cells. So I need to modify he formula to display the result in a specifically assigned cell. Can anyone show me where to put this value in the formula.

Code:
--------------------
Sub Add1()
Selection.Value = Selection.Value + 1
Beep
End Sub

thanks!

[email protected]

a button to add 1 to a SPECIFIC cell
 
Sub Add1()
Range("A1").Value = Range("A1").Value + 1
Beep
End Sub


All times are GMT +1. The time now is 04:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com