ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Running Tally (https://www.excelbanter.com/excel-discussion-misc-queries/239681-running-tally.html)

accessnovice

Running Tally
 
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!

Dave Peterson

Running Tally
 
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 he
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.)

accessnovice wrote:

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!


--

Dave Peterson


All times are GMT +1. The time now is 02:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com