View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default add 1 to a sum by clicking mouse?

right click sheet tabview codeinsert thissave. Now when you just select
cell a5 1 will be added to the sum.


Option Explicit
Dim oldvalue As Double
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$5" Or Target.Address = "$B$5" Then
Application.EnableEvents = False
If Target.Value = 0 Then oldvalue = 0
Target.Value = 1 + oldvalue
oldvalue = Target.Value
Application.EnableEvents = True
End If
End Sub
Sub fixit()
Application.EnableEvents = True
End Sub


--
Don Guillett
SalesAid Software

"muzic247" wrote in message
...
In Excel, can 1 be added to the sum by clicking once in a cell? For
instacne, if I click once in a cell correspong to the cell that displays
the
sum of a row, one will be added. Each time I click the mouse, 1 is added
to
the total? Just like a small hand held clicker.