#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 159
Default Counting

I want to replace, with an Excel workbook, a blank hardcopy table in
which users count the number of occurrences of a particular kind (in
this case various types of queries at a reception desk) by marking
boxes with with a | for every occurence then a slash through every
|||| in the 'five bar gate' way. What's the best way to set up a
workbook so they can do something similar with one keystroke or one
mouse-click for each occurrence? I could just get them to increase
the number in each box by one every time they get a query, but I think
this might be confusing,

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Counting

Hi rob

Not using the 5 bar gate method, but a simple addition when a cell is
clicked would be the following code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myrange As Range
Set myrange = Range("A1:A8") '<<-- Alter to suit
If Target.Count 1 Then Exit Sub
If Not Intersect(Target, myrange) Is Nothing Then
Target.Value = Target.Value + 1
Range("B1").Activate ' to move focus away form the target range
End If
End Sub

To USE
Copy code above
Right click on the sheet tab you are usingView Code
Paste code into white pane that appears
Alt+F11 to return to Excel

I have chosen the range A1:A8 as the cells where the addition is to take
place. Amend to suit your case.
Equally, after clicking and the number being incremented in the cell, I am
moving the focus away for that cell, to ensure that the change selection
will get triggered next time the user wants to add another one.
I have used B1 as the cell to move to - again change to suit.
--
Regards
Roger Govier

"robzrob" wrote in message
...
I want to replace, with an Excel workbook, a blank hardcopy table in
which users count the number of occurrences of a particular kind (in
this case various types of queries at a reception desk) by marking
boxes with with a | for every occurence then a slash through every
|||| in the 'five bar gate' way. What's the best way to set up a
workbook so they can do something similar with one keystroke or one
mouse-click for each occurrence? I could just get them to increase
the number in each box by one every time they get a query, but I think
this might be confusing,


__________ Information from ESET Smart Security, version of virus
signature database 4530 (20091021) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 4530 (20091021) __________

The message was checked by ESET Smart Security.

http://www.eset.com



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 159
Default Counting

On Oct 21, 10:59*pm, "Roger Govier"
<roger@technology4unospamdotcodotuk wrote:
Hi rob

Not using the 5 bar gate method, but a simple addition when a cell is
clicked would be the following code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
* * Dim myrange As Range
* * Set myrange = Range("A1:A8") * *'<<-- Alter to suit
* * If Target.Count 1 Then Exit Sub
* * If Not Intersect(Target, myrange) Is Nothing Then
* * * * Target.Value = Target.Value + 1
* * * * Range("B1").Activate * *' to move focus away form the target range
* * End If
End Sub

To USE
Copy code above
Right click on the sheet tab you are usingView Code
Paste code into white pane that appears
Alt+F11 to return to Excel

I have chosen the range A1:A8 as the cells where the addition is to take
place. Amend to suit your case.
Equally, after clicking and the number being incremented in the cell, I am
moving the focus away for that cell, to ensure that the change selection
will get triggered next time the user wants to add another one.
I have used B1 as the cell to move to - again change to suit.
--
Regards
Roger Govier

"robzrob" wrote in message

...





I want to replace, with an Excel workbook, a blank hardcopy table in
which users count the number of occurrences of a particular kind (in
this case various types of queries at a reception desk) by marking
boxes with with a | for every occurence then a slash through every
|||| in the 'five bar gate' way. *What's the best way to set up a
workbook so they can do something similar with one keystroke or one
mouse-click for each occurrence? *I could just get them to increase
the number in each box by one every time they get a query, but I think
this might be confusing,


__________ Information from ESET Smart Security, version of virus
signature database 4530 (20091021) __________


The message was checked by ESET Smart Security.


http://www.eset.com


__________ Information from ESET Smart Security, version of virus signature database 4530 (20091021) __________

The message was checked by ESET Smart Security.

http://www.eset.com- Hide quoted text -

- Show quoted text -


Just what I needed. Thank you.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
counting function but not double counting duplicates JRD Excel Worksheet Functions 2 November 7th 07 06:43 PM
Counting bjenkins Excel Discussion (Misc queries) 4 December 2nd 05 04:21 PM
Counting Pos and Neg #'s jimbob Excel Discussion (Misc queries) 4 November 27th 05 08:09 PM
Counting rows, then counting values. Michael via OfficeKB.com Excel Discussion (Misc queries) 7 August 4th 05 10:57 PM
Counting names in a column but counting duplicate names once TBoe Excel Discussion (Misc queries) 9 May 11th 05 11:24 PM


All times are GMT +1. The time now is 06:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"