• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Count by clicking

jpmeadors

New Member
I would like to click on a cell and have the number of each click show up in the cell. Example: If I click the cell A5 five times the number "5" appears in the cell. Or click A4 and the number shows up in A5.


Any ideas?
 
Perhaps Developer Tab > Form Control > Insert > Form > Spin Button


The place the button (left click on sheet), size it up, then right click on it and choose "FORMAT CONTROL". One of the tabs, you will see "Link cell". In your case, type in A5. Leave everything else as-is.


Save it up and hit ESCAPE to de-select the form control you just made. Now, click on the up/down arrows. It's not as robust as what you'd like but perhaps that will suffice?
 
There is something cool (read awesome for Chandoo.org readers)which I came up with and i'd like to share


Use of the F4 key can be a resource here. The F4 key is used to repeat the last task


Your query is by clicking on a cell the value should increase by 1


This can be achieved as follows -


In an empty cell enter value 1

copy cell

right click on any other cell, paste special > select value & add

Use key board to move to any cell where you wish to add 1, press F4 and voila! the value increases by 1


This is neat trick to use, was a life saver for me recently
 
Hi,


@lavkeshbhatia - nice one, just to add when you have finished adding to your numbers, press the Esc key rather than the Enter key just incase you have moved to an empty cell after your last paste else you will get a 1 in the empty cell as well.
 
Thx oldchippy.


another thing to add, this way even a null cell will have an entry once f4 is pressed


I've put up an animated gif, to make for easier understanding


http://farm4.static.flickr.com/3307/4588225481_e04c91c922_o.gif


give it a few seconds to load before it animates


I think this would be new to most readers. It will be great if Chandoo puts a link to this or adds on to this
 
Good one Lavkesh.. I have taken it one step ahead and defined a macro incrementCell that would take whatever is in cell A1 and increment the selected cell(s) by that value. So if A1 has 1, and you select the range B1:B10, all the cells will get 1 added to them. You can find the example file here: http://chandoo.org/img/vba/incrementCell%20Macro.xls


You can run the macro by pressing CTRL+SHIFT+i (letter i) btw...
 
Back
Top