right click sheet tabview codecopy/paste ALL of this.
Now when cell a5 or cell b5 is selected the cell count will increment by one
'==========
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
'============
A variation for a double click instead of select
Private Sub Worksheet_BeforeDoubleClick(ByVal target As Range, Cancel As
Boolean)
If target.Address = "$A$5" Or target.Address = "$A$6" Then
On Error GoTo fixit
Application.EnableEvents = False
If target.Value = 0 Then oldvalue = 0
target.Value = 1 * target.Value + 1
oldvalue = target.Value
fixit:
Application.EnableEvents = True
End If
Cancel = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Philip Drury" wrote in message
...
A colleague is reporting on a recent survey, she has set up the questions
in
Column A and the potential answers across row 1. What she wants is that
each
time she clicks the mouse in the relevant cell it will count from 1
upwards -
does anyone know if this is possible???
Thanks