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
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