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.
|
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. |
Quote:
Thanks Gord, brill just what I wanted, that makes the job of data entry easy. |
Quote:
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? |
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