View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default I want to create a check list with a count of entries at bottom.

To allow only an "x" to be entered use DataValidationAllowCustom

=cellref="x"

Select a range of cells first so that validation will be on all the cells.

If you want worksheet event code that will enter an "x" upon a double-click on a
cell try this.

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column < 26 Then
n = Target.Row
If Target.Value = "" Then
Target.Value = "x"
End If
End If
Cancel = True
enditall:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the code into that sheet module.


Gord Dibben MS Excel MVP

On Mon, 24 Dec 2007 13:01:01 -0800, Bupkus
wrote:

Actually I don't really need checkboxes. I just thought of that as one way to
mark an entry with a single mouse click. If a mouse click entered an "X" that
would be great too. I tried using the CountA function for totalling a count
but if a user accidentally enters a space char that would be counted too and
I don't know how to restrict entries to "x" only.
Easiest for user, naturally, would be a mouse click that enters an "x" char.

"Bupkus" wrote:

I have a table of 25 columns and a variable number of rows. Each row
represents a person and each column represents an activity. If person has
requested an activity then user mouse clicks in cell to mark person to that
activity. Bottom row has totals for each activity.
I would like a checkbox matrix where cells with checked box are counted in
the Totals row.
I'm over my head here and time doesn't allow for me any more research.
Thanks.