How would I set up a cell for data entry where the value of the cell changes from 0 to 1 or back from 1 to 0 based on a clicking on the cell?
Thanks Russ - a guy with a 100 surveys to enter
How would I set up a cell for data entry where the value of the cell changes from 0 to 1 or back from 1 to 0 based on a clicking on the cell?
Thanks Russ - a guy with a 100 surveys to enter
You would need an event macro to do this.
Let's assume you want this to happen to cells in the range A1:A100.
Right click the sheet tab
Select View Code
Copy and paste the code below into the window that opens:
Close the window to return to Excel.Please Login or Register to view this content.
Try it out.
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
I did install the code. But no luck yet, please look at tab q9-19 on my Excel.
I did not see how to post it here. So i will put it at a dropbox.
Russ
From Russ:
"https://www.dropbox.com/sh/lq0g5r1guuzim01/wsLDMZYUjj?m"
Click here to view Excel
(Russ shared these files using Dropbox. Enjoy!)
OK, you need to change the range where you want this to happen.
Change this line of code from:
To:If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
If Not Intersect(Target, Range("B2:AJ45")) Is Nothing Then
The code that Tony provided you with is correct and is working. You just need to change the range.
Based on your excel file the range for your Q9-19 sheet would be
Please Login or Register to view this content.
Works ! yeppie .. I will post the link for all others in the future including myself of this process. You must get off the cell and back into it for switch from 1 back to zero. But, the whole process is just a clicking of binary 1 and 0-s and no drop-downs and numeric keys to press.
https://www.dropbox.com/sh/lq0g5r1guuzim01/wsLDMZYUjj
Thanks
Russ
You can use the BeforeDoubleClick event so as to not have to be off the cell to make the change.
Here's the code:
Now, just left double click the cell and it will toggle between 1 and 0.Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks