dtallent

New Member
Joined
Oct 1, 2018
Messages
9
I am tying to create a file in excel so that I can keep track of my daughter's volleyball stats. What I want to do is touch the screen and it will auto count, say it has 0, I touch the screen and it changes to 1, touch again and it goes to 2. I saw a macro that was created to allow the cell to change color, but I would rather it change to a number an keep counting as long as I touch he cell. Does anyone have a idea on how to do this? Below is the macro I found, but it just changes color.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'if cell fill is Blank, change to Brown
If Selection.Interior.Color = RGB(255, 255, 255) Then
Selection.Interior.Color = RGB(247, 150, 70)
GoTo Passem
End If
'if cell fill is Brown, change to Yellow
If Selection.Interior.Color = RGB(247, 150, 70) Then
Selection.Interior.Color = RGB(255, 255, 0)
GoTo Passem
End If
'If cell fill is Yellow, remove fill color
If Selection.Interior.Color = RGB(255, 255, 0) Then
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End If
Passem:
End Sub
 
Well if you copied the same script into 5 sheets it should work on all sheets.

Show me the script your now using
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Well you said this earlier:
I have it working perfectly. Thanks for your help. It was greatly appreciated.
 
Upvote 0

Forum statistics

Threads
1,217,366
Messages
6,136,128
Members
449,993
Latest member
Sphere2215

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