How can I create a click counter?

jiberish123

New Member
Joined
Aug 18, 2009
Messages
3
Hello all, I am trying to create a form that would have a list of items that would add the times I click on each item, in other words, each time I click on "Item" it would count 1,2,3, etc. Any sugestions? :p
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Perhaps something like would work if the list is in column A and the count of clicks is in column B.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    With Target
        If .Cells.Count = 1 And .Column = 1 And .Value <> vbNullString Then
            With .Offset(0, 1)
                .Value = Val(.Text) + 1
            End With
        End If
    End With
End Sub
 
Upvote 0
Hi mikerickson, thanks for the quick reply. How would I go about getting this code into a cell? Is it a macro?
 
Upvote 0
Thank you mikerickson, I managed to create a module1 with the code you provided but i still think it is over my head. Once I create the list on the Excel sheet how do I activate the individual cells to run the procedure? Sorry for being such a pain.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,241
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top