I have one worksheet where the cells are identified by is background color. It means that each cell is manually colored in a set of 11 colors that have been previously choosen. How can I restrict the format cells (fill) to only these 11 colors? Is there any VBA code where I can only choose one of these 11 colors? The pallete in the Format Cells has a lot of colors and it´s easy to choose a wrong color specially when they are similar.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Restrict the number of colors in Excel 2007
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Restrict the number of colors in Excel 2007
- This topic has 6 replies, 3 voices, and was last updated 12 years, 5 months ago.
Viewing 4 reply threadsAuthorReplies-
WSMartinM
AskWoody LoungerNovember 14, 2012 at 6:26 am #1356936You can’t reduce the number of colours displayed in the Excel palette, but you could edit it so that only the colours you want are there and the other boxes are simply repeats of those colours (or are all an obviously “wrong” colour) – then you cannot select an incorrect colour.
Instructions on how to customise the palette are here: http://support.microsoft.com/kb/288412
-
WSPFGF
AskWoody LoungerNovember 14, 2012 at 7:22 am #1356939Thank you for your answer. But what I pretend is (I don’t know if this is possible): The same way I use the Data Validation for fill the cells with values from a list, it is possible to choose not values but cells fill with colors? This means that when I choose from that list one of these colors, the cell will be automaticaly formated (fill) with that color. In that way I put on the list of the Data Validation only the colors I want and I never go wrong again. If it’s not possible that way there are any VBA code I can use? Thank you again.
-
WSMartinM
AskWoody LoungerNovember 14, 2012 at 10:29 am #1356961Yes, I think you CAN do that.
This is how I would set about it – and you might just choose to stop at the manual step !
1. Set up a sheet with your chosen colours, and any other formats you want, in a table of cells, alongside their description.
2. Give each of the coloured cells a meaningful range name.
3. Now record a macro as follows:
4. Using the Format Painter, copy the format you want and past it into your chosen target cell – that’s the manual method I referred to above.
5. Stop the recording.
Now I don’t know how good your VBA skills are, but the Macro you have just recorded contains the heart of what you want to do and it should be
straightforward to adapt it, say, to:a. give you a list of formats to choose from – from the descriptions you entered in step 1
c. apply the chosen format to the currently active cell.
Finally if you give this VBA module a shortcut key then I think the job is done.
-
WSPFGF
AskWoody Lounger -
WSsdckapr
AskWoody LoungerNovember 14, 2012 at 2:05 pm #1356994A relatively easy approach would be to have the cell next to the colored cell which has a number 1-11 or the name of the color. You can create the validation on that cell (either by the number 1-11 or via a list of the colors), then use conditional formatting to set the color of the desired cell, based on that value or number.
Steve
-
WSPFGF
AskWoody Lounger
-
Viewing 4 reply threads -

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
-
‘Minority Report’ coming to NYC
by
Alex5723
3 hours, 34 minutes ago -
Apple notifies new victims of spyware attacks across the world
by
Alex5723
3 hours, 41 minutes ago -
Tracking content block list GONE in Firefox 138
by
Bob99
3 hours, 5 minutes ago -
How do I migrate Password Managers
by
Rush2112
11 minutes ago -
Orb : how fast is my Internet connection
by
Alex5723
38 minutes ago -
Solid color background slows Windows 7 login
by
Alex5723
15 hours, 21 minutes ago -
Windows 11, version 24H2 might not download via Windows Server Updates Services
by
Alex5723
13 hours, 51 minutes ago -
Security fixes for Firefox
by
Susan Bradley
6 minutes ago -
Notice on termination of services of LG Mobile Phone Software Updates
by
Alex5723
1 day, 2 hours ago -
Update your Apple Devices Wormable Zero-Click Remote Code Execution in AirPlay..
by
Alex5723
1 day, 11 hours ago -
Amazon denies it had plans to be clear about consumer tariff costs
by
Alex5723
1 day, 2 hours ago -
Return of the brain dead FF sidebar
by
EricB
13 hours, 21 minutes ago -
Windows Settings Managed by your Organization
by
WSDavidO61
12 hours, 29 minutes ago -
Securing Laptop for Trustee Administrattor
by
PeachesP
13 hours, 30 minutes ago -
The local account tax
by
Susan Bradley
14 hours, 41 minutes ago -
Recall is back with KB5055627(OS Build 26100.3915) Preview
by
Alex5723
2 days ago -
Digital TV Antenna Recommendation
by
Win7and10
1 day, 16 hours ago -
Server 2019 Domain Controllers broken by updates
by
MP Support
2 days, 12 hours ago -
Google won’t remove 3rd party cookies in Chrome as promised
by
Alex5723
2 days, 13 hours ago -
Microsoft Manager Says macOS Is Better Than Windows 11
by
Alex5723
2 days, 16 hours ago -
Outlook (NEW) Getting really Pushy
by
RetiredGeek
1 day, 19 hours ago -
Steps to take before updating to 24H2
by
Susan Bradley
3 hours, 47 minutes ago -
Which Web browser is the most secure for 2025?
by
B. Livingston
1 day, 23 hours ago -
Replacing Skype
by
Peter Deegan
1 day, 12 hours ago -
FileOptimizer — Over 90 tools working together to squish your files
by
Deanna McElveen
2 days, 10 hours ago -
Excel Macro — ask for filename to be saved
by
nhsj
1 day, 8 hours ago -
Trying to backup Win 10 computer to iCloud
by
SheltieMom
1 day, 12 hours ago -
Windows 11 Insider Preview build 26200.5570 released to DEV
by
joep517
4 days, 16 hours ago -
Windows 11 Insider Preview build 26120.3941 (24H2) released to BETA
by
joep517
4 days, 18 hours ago -
Windows 11 Insider Preview Build 22635.5305 (23H2) released to BETA
by
joep517
4 days, 18 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
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.