We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide
help with excel - auto enter data into a cell
robnye
Posts: 5,411 Forumite
in Techie Stuff
can anyone help.
I am creating a spreadsheet and would like it to automatically enter a tick into a cell when i click on the cell
how can i do this?
I am creating a spreadsheet and would like it to automatically enter a tick into a cell when i click on the cell
how can i do this?
smile --- it makes people wonder what you are up to....
:cool:
0
Comments
-
You can do it with a double-click. First format the cell(s) as the Windings 2 font - with this, typing a capital P displays a tick.
Then right-click the sheet tab - View Code and paste in:Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Cancel = True If Not Intersect(Target, Range("A1:A10")) Is Nothing Then If Target = "P" Then Target = vbNullString ElseIf Target = vbNullString Then Target = "P" End If End If End SubFor the above code, cells A1 to A10 have been formatted as Windings 2.
You can also do it with a right-click. Change the subroutine name to:
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)0 -
took a couple of mins to get my head around it, but brilliant it works.....smile --- it makes people wonder what you are up to....
:cool:0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 353.5K Banking & Borrowing
- 254.2K Reduce Debt & Boost Income
- 455K Spending & Discounts
- 246.6K Work, Benefits & Business
- 602.9K Mortgages, Homes & Bills
- 178.1K Life & Family
- 260.6K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards