Hello
I want to create a clickable counter that will increase by multiples of 1 everytime it is clicked. Can someone please advise?
Thanks
Sam
Hello
I want to create a clickable counter that will increase by multiples of 1 everytime it is clicked. Can someone please advise?
Thanks
Sam
I am not sure about single click but you can do this using double click.
Right click on the sheet where you want the increment to happen, select View code and copy this code -
![]()
Option Explicit Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Target.Value = Target.Value + 1 End Sub
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
I am a little confused. I want to have a button that i can click and i will be able to see the numbers increasing. Like a tally. I am not the best on excel so need a walk through really. Thanks for the advice.
You can use a helper sheet and have a sequential list of numbers up to the highest value you want.
Sample code
![]()
Sub samwright() MsgBox Sheets("Helper").Range("A1").Value Sheets("Helper").Range("A1").Cut Range("A" & Rows.Count).End(3)(2) Sheets("Helper").Range("A1").Delete xlUp End Sub
Where are the numbers located? In which cells?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks