ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Change cell data using a mouse click? (https://www.excelbanter.com/new-users-excel/448060-change-cell-data-using-mouse-click.html)

princejim

Change cell data using a mouse click?
 
I have tables with lots of cells containing a zero, I would like to change cells at random to a 1 just by clicking on the cell, new user so any help would be much appriciated.

Gord Dibben[_2_]

Change cell data using a mouse click?
 
Right-click on sheet tab and "View Code" to open sheet module.

Copy/paste this code into that module.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
ActiveCell.Value = 1
Cancel = True
End Sub

Close and d-click on any cell with a zero.


Gord

On Fri, 25 Jan 2013 19:18:47 +0000, princejim
wrote:


I have tables with lots of cells containing a zero, I would like to
change cells at random to a 1 just by clicking on the cell, new user so
any help would be much appriciated.


princejim

Quote:

Originally Posted by Gord Dibben[_2_] (Post 1608920)
Right-click on sheet tab and "View Code" to open sheet module.

Copy/paste this code into that module.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
ActiveCell.Value = 1
Cancel = True
End Sub

Close and d-click on any cell with a zero.


Gord




On Fri, 25 Jan 2013 19:18:47 +0000, princejim
wrote:


I have tables with lots of cells containing a zero, I would like to
change cells at random to a 1 just by clicking on the cell, new user so
any help would be much appriciated.


Thanks Gord, brill just what I wanted, that makes the job of data entry easy.

princejim

Quote:

Originally Posted by princejim (Post 1608954)
Thanks Gord, brill just what I wanted, that makes the job of data entry easy.

That works great however I have added another sum box, which the input can be manual, but could it be made automatic.

form
heading
H L
1 0
0 0
0 0
Total correct
1 0
Total tests
6

When using the above programm, double clicking on the first zero changes it to a 1. Clicking on any zero it would change to a 1(great)

H an L are tests, so the pupil takes 6 tests in all: Is there away in which I can still double click for the 1 and just 1 click on the zero to automatically increment the total test cell? So in this case I would double click first cell (H colum) and get a 1 also 1 in the total test cell, then just a single click in all the other cells, this would leave the zero and would just increment the total test cell?

Gord Dibben[_2_]

Change cell data using a mouse click?
 
You're welcome.

Gord

On Mon, 28 Jan 2013 09:11:47 +0000, princejim
wrote:


'Gord Dibben[_2_ Wrote:
;1608920']Right-click on sheet tab and "View Code" to open sheet
module.

Copy/paste this code into that module.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target _
As Range, Cancel As Boolean)
ActiveCell.Value = 1
Cancel = True
End Sub

Close and d-click on any cell with a zero.


Gord




On Fri, 25 Jan 2013 19:18:47 +0000, princejim
wrote:
-

I have tables with lots of cells containing a zero, I would like to
change cells at random to a 1 just by clicking on the cell, new user

so
any help would be much appriciated.-



Thanks Gord, brill just what I wanted, that makes the job of data entry
easy.



All times are GMT +1. The time now is 07:08 AM.

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