-
WSuseful
AskWoody LoungerThanks for your response Paul, I will check out your suggestions.
Regards
useful -
WSuseful
AskWoody LoungerThank you Bundaburra, I’ll give it a try.
Regards
useful -
WSuseful
AskWoody LoungerJune 6, 2016 at 4:47 am in reply to: Excel 2010 – date field leading space and serial value problems #1566511Hi Zeddy
What can I say … you are a real genius! I am so grateful that you responded and did it so promptly!
I only wish I could return the favour!
Eternally grateful!
useful
-
WSuseful
AskWoody LoungerThank you all. I have managed to work it all out (and learned a lot in the process) so all of the issues are now resolved.
useful
-
WSuseful
AskWoody LoungerI forgot to add that when I replace the number 1 with a tick, the colours disappear and as I can’t find where they are, I am unable to restore them.
I hope someone can assist.
Thank you in anticipation.
useful
-
WSuseful
AskWoody LoungerI have managed to achieve two of the above three challenges, but I am unable to change the number 1 to a tick in the code, which for convenience, is listed below:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim zCol
Dim zRowzCol = Target.Column ‘column number of selected cell
zRow = Target.Row ‘row number of selected cellIf zRow = 1 Then Exit Sub ‘ignore cell selection in header row
If zRow > 456 Then Exit Sub ‘ignore cell selection past last row
If zCol [h1].Column Then Exit Sub ‘ignore columns to right of col [H]‘target column must be in range [E:H]
If Target.Count 1 Then Exit Sub ‘ignore highlighting of multiple cells
‘only single cell selected or clicked, so..
If Target.Value = 1 Then ‘existing cell already has a 1 entered, so..
Target = “” ‘clear existing entry
Else ‘otherwise..
Target = 1 ‘set cell entry to 1
End If ‘end of test for existing entry‘—————————————-
Select Case zColCase 5 ‘cell in col [E] clicked
Cells(zRow, 6) = “” ‘clear anything in [F]
Cells(zRow, 7) = “” ‘clear anything in [G]
Cells(zRow, 8) = “” ‘clear anything in [H]Case 6 ‘cell in col [F] clicked
Cells(zRow, 5) = “” ‘clear anything in [E]
Cells(zRow, 7) = “” ‘clear anything in [G]
Cells(zRow, 8) = “” ‘clear anything in [H]Case 7 ‘cell in col [G] clicked
Cells(zRow, 5) = “” ‘clear anything in [E]
Cells(zRow, 6) = “” ‘clear anything in [F]
Cells(zRow, 8) = “” ‘clear anything in [H]Case 8 ‘cell in col [H] clicked
Cells(zRow, 5) = “” ‘clear anything in [E]
Cells(zRow, 6) = “” ‘clear anything in [F]
Cells(zRow, 7) = “” ‘clear anything in [G]End Select
Calculate ‘<< require for recalculation of conditional formatting
End Sub 'Worksheet_SelectionChange
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Dim zCol
zCol = Target.Column 'column number of selected cell
If zCol [h1].Column Then Exit Sub ‘ignore columns to right of col [H]
‘target column must be in range [E:G]
If Target.Count 1 Then Exit Sub ‘ignore highlighting of multiple cells
Cancel = True‘only single cell selected, so..
Target = “” ‘clear existing entry
Calculate ‘<< require for recalculation of conditional formattingEnd Sub
I would be very grateful for your help.
Thank you in anticipation.
useful
-
WSuseful
AskWoody LoungerHi All
As you can clearly see, I’m just an keen amateur …
zeddy interpreted it all correctly, in spite of me. Clearly it makes no sense to be able to select more than one column in any one row. I should have made that clear. My apologies.
Whilst I can’t code, I can sort of read it, especially code as well commented as zeddy’s. Looking at it very carefully, I struggled to find anything relating to the colours in those cells that I copied from RG, or find the validation for the numbers, or the pick-list for the Y/N, but it all works fine. As a result, I was not surprised that when I copied the code and put it into my spreadsheet nothing worked.
Undeterred, I then tried to copy my spreadsheet into the one set up by zeddy … unfortunately that failed as well. Nothing copied and the whole process just ‘hung’.
In summary this is what I would like to achieve:
– Copy my spreadsheet into the one set up by zeddy, so that it all works;
– Change the number 1 into a centred tick, just as zeddy proposed;
– Fix the issue where clicking in the unprotected cell when the zeddy spreadsheet opens, does nothing.Thank you in anticipation.
useful
-
WSuseful
AskWoody LoungerI seem to have got excited a little too soon … the code worked like a charm at the beginning, but when I added worksheet protection, it failed and also, it adds a 1 to every cell I click on, not just in the columns I want it to.
A small test spreadsheet (with the VBA code) is attached here, so I can better explain what I am trying to achieve:
– The cells in grey are protected and the ones in white can be typed in (the password is test)
– The cells in Column C will have numbers typed in
– The cells in Column D will either have N or Y typed in
– The cells in Columns E, F, G and H are the only cells to have colours when clicked and the number 1 inserted, nowhere elseI would be very grateful if someone could help me with this.
Thank you in anticipation.
useful :confused:
-
WSuseful
AskWoody LoungerThank you all. You are wonderful!
My issue is resolved and I am very grateful that the knowledgeable responses were so prompt!
Long may you continue to give sound advice!
useful
-
WSuseful
AskWoody LoungerSorry, my shorthand is obviously too cryptic.
What I mean is, could you please add to the code, such that in addition to changing colour when clicked, the cell also now has a number 1 in it.
Thank you.
useful
-
WSuseful
AskWoody LoungerHi Amazing Geek!
You are a gem (as always). Your code worked an absolute treat!
The one thing I forgot in my previous post, was to also populate the clicked cell with 1 apart from the colour.
Thank you very much in anticipation.
useful
-
WSuseful
AskWoody LoungerThank you for the explanation Charles.
Regards
useful -
WSuseful
AskWoody LoungerThank you folks!
I did not realise that Word would ‘remember’ a deleted second page in a template. Very clever.
Regards
useful -
WSuseful
AskWoody LoungerThank you again Andrew.
Regards
useful -
WSuseful
AskWoody LoungerHi Andrew
I forgot to ask you, could you please tell me where I can find a list of the icons, one of which, 526, you inserted into the code.
Thank you.
Regards
useful
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Looking for personal finance software with budgeting capabilities
by
cellsee6
24 minutes ago -
ATT/Yahoo Secure Mail Key
by
Lil88reb
11 hours, 43 minutes ago -
Devices with apps using sprotect.sys driver might stop responding
by
Alex5723
16 hours, 5 minutes ago -
Neowin – 20 times computers embarrassed themselves with public BSODs and goofups
by
EP
1 day ago -
Slow Down in Windows 10 performance after March 2025 updates ??
by
arbrich
2 hours, 55 minutes ago -
Mail from certain domains not delivered to my outlook.com address
by
pumphouse
9 hours, 3 minutes ago -
Is data that is in OneDrive also taking up space on my computer?
by
WShollis1818
19 hours, 43 minutes ago -
Nvidia just fixed an AMD Linux bug
by
Alex5723
2 days, 11 hours ago -
50 years and counting
by
Susan Bradley
2 hours, 2 minutes ago -
Fix Bluetooth Device Failed to Delete in Windows Settings
by
Drcard:))
1 day, 18 hours ago -
Licensing and pricing updates for on-premises server products coming July 2025
by
Alex5723
2 days, 22 hours ago -
Edge : Deprecating window.external.getHostEnvironmentValue()
by
Alex5723
2 days, 22 hours ago -
Rethinking Extension Data Consent: Clarity, Consistency, and Control
by
Alex5723
2 days, 22 hours ago -
OneNote and MS Word 365
by
CWBillow
3 days ago -
Ultimate Mac Buyers Guide 2025: Which Mac is Right For You?
by
Alex5723
3 days ago -
Intel Unison support ends on Windows 11 in June
by
Alex5723
3 days ago -
April 2025 — still issues with AMD + 24H2
by
Kevin Jones
16 hours, 14 minutes ago -
Windows 11 Insider Preview build 26200.5518 released to DEV
by
joep517
3 days, 12 hours ago -
Windows 11 Insider Preview build 26120.3671 (24H2) released to BETA
by
joep517
3 days, 12 hours ago -
Forcing(or trying to) save Local Documents to OneDrive
by
PateWilliam
3 days, 21 hours ago -
Hotpatch for Windows client now available (Enterprise)
by
Alex5723
3 days, 9 hours ago -
MS-DEFCON 2: Seven months and counting
by
Susan Bradley
2 days, 10 hours ago -
My 3 monitors go black & then the Taskbar is moved to center monitor
by
saturn2233
4 days, 6 hours ago -
Apple backports fixes
by
Susan Bradley
3 days, 12 hours ago -
Win 11 24H2 will not install
by
Michael1950
2 days, 10 hours ago -
Advice to convert MBR to GPT and install Windows 11 Pro on unsupported PC
by
Andy M
1 day, 4 hours ago -
Photos from iPhone to Win 10 duplicating/reformatting to .mov
by
J9438
2 days, 19 hours ago -
Thunderbird in trouble. Here comes Thundermail
by
Alex5723
1 day, 6 hours ago -
Get back ” Open With” in context menus
by
CWBillow
4 days, 21 hours ago -
Many AMD Ryzen 9800X3D on ASRock have died
by
Alex5723
3 days, 13 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.