View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Cliff Myers Cliff Myers is offline
external usenet poster
 
Posts: 48
Default Cell onclick make cell value increase.

I think I am understanding what you want. In your worksheet_SelectionChange
envent add this code:
If Not IsNumeric(ActiveCell.Value) Then
Exit Sub
ElseIf IsEmpty(ActiveCell) Then
Exit Sub
Else
ActiveCell.Value = ActiveCell.Value + 1
End If
The code will check the activecell, if it is text it will do nothing, if the
cell is blank, it will do nothing, else it will increase by one.

HTH
"Cali92" wrote in message
...
Hi everyone.
I need this, but still can't figure out how to do this...

I have a spreadsheet with A and B in which I insert people name and a
number, ie Carlo Gonella (A) 4 (B).
then on the same row I have a lot of cell with an initial value of 0.
(there are 20 cells)
My need is that when I left click on the cell, its value increase by
one...

So that I will have something like

A | B | C | D | E | F | G | H | I |
Carlo Gonella | 4 | 2 | 0 | 1 | 3 | 0 | 3 | 4 | and so on ....

But I really can't figure out where and what to code ...

I was thinking about a userform in which putting many buttons as the
names in the A column, and a number of txtboxes as the columns I need
to increase.
Selecting a name, the values will be the one referring to that person,
changing name they will change.


Thanks in advance for your help...

I Attach the baseline for what I need ...

Cali92

File Attached: http://www.exceltip.com/forum/attach...?postid=281708

(scout1.xls)

------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/