Running Tally

A

accessnovice

I know I am reaching here but just wondering - I have a survey that I need to
tally. Is there a formula or a way to set up a cell where I can just click
that cell and it will keep adding each time I click on the cell and then give
me the total number of times that the cell has been "activated" ? Thanks!
 
D

Dave Peterson

You can have an event macro fire when you select the cell (clicking on it or
using the arrow keys, but coming from a different cell).

But how about just adding a button from the Forms toolbar that increments a
cell.

Option Explicit
Sub testme()
Dim myCell As Range

Set myCell = ActiveSheet.Range("A1")

With myCell
If IsNumeric(.Value) Then
.Value = .Value + 1
End If
End With
End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top