How to Highlight Excel Cells by Clicking with a Selected Color
Question details
The user wants to format or highlight multiple Excel cells simply by clicking on them, and potentially needs a way to switch between different colors quickly.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Applying specific background colors to multiple scattered cells in a spreadsheet without navigating the ribbon menus each time.
- Observed behavior
- The standard Format Painter requires re-selecting for different colors, making it inefficient for switching colors repeatedly unless a custom macro tool is used.
If you plan to use VBA code to handle persistent multi-color highlighting, ensure your workbook is saved as a Macro-Enabled Workbook (.xlsm).
Use Format Painter for a Single Repeated Color
This is the easiest built-in method if you only need to apply one specific background color to multiple non-adjacent cells.
Excel's Format Painter allows you to copy formatting from one cell and apply it to others. By double-clicking the tool, you lock it into a persistent mode, allowing you to click as many cells as you want without the tool turning off.
Select a cell and apply your desired background color using the Fill Color tool in the Home tab.
With the colored cell selected, double-click the 'Format Painter' icon located in the Clipboard group on the Home tab.
Click each individual cell or click and drag over ranges you wish to highlight. The color will be applied to every cell you click.
Once you are finished applying the color, press the 'Esc' key on your keyboard to turn off the Format Painter.

Create a VBA Macro for Persistent Color Switching
Ideal if you need to dynamically switch colors and apply them by clicking cells until manually canceled.
Highlight and Format Cells Quickly with WPS Office
WPS Spreadsheet offers powerful formatting tools, a highly responsive Format Painter, and full VBA macro support to handle repetitive cell coloring tasks efficiently.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet document.
- 2. Apply single-color formatting: Format a cell, double-click 'Format Painter' on the Home tab, and click your target cells.
- 3. Enable VBA macros for advanced coloring: Go to the 'Tools' tab and click 'Macro' to open the VBA Editor for custom scripts.
- 4. Save your automated workbook: Insert your cell-highlighting VBA code and save the file as a Macro-Enabled Workbook to retain the functionality.

Frequently Asked Questions
Can I use conditional formatting instead of clicking cells one by one?
Yes. If the highlighting depends on the cell's value, text, or data trends, Conditional Formatting automatically applies colors based on rules you define, saving you from clicking individual cells manually.
Why does my Format Painter turn off after clicking just one cell?
If you single-click the Format Painter icon, it only applies the format once. You must double-click the icon to lock it in persistent mode, allowing you to click and format multiple cells consecutively.
Are VBA macros the only way to switch colors quickly?
While macros provide the most automated 'click-to-paint' experience, you can also set up custom Cell Styles in the Home tab and apply them with keyboard shortcuts for relatively quick manual color switching.
How do I stop a macro that highlights every cell I click?
You can either add a toggle condition (like a checkbox) to your VBA code to enable/disable the Worksheet_SelectionChange event, or you can simply delete or comment out the VBA code in the editor when you are finished.




