VBA & Macro Problems

How to Highlight Excel Cells by Clicking with a Selected Color

Kushani NimanthikaKushani Nimanthika Nov 10, 2026 869 views

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.

How to Highlight Excel Cells by Clicking with a Selected Color
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.
Before you start

If you plan to use VBA code to handle persistent multi-color highlighting, ensure your workbook is saved as a Macro-Enabled Workbook (.xlsm).

Solution 1Recommended

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.

1
Format the reference cell

Select a cell and apply your desired background color using the Fill Color tool in the Home tab.

2
Activate persistent Format Painter

With the colored cell selected, double-click the 'Format Painter' icon located in the Clipboard group on the Home tab.

3
Highlight target cells

Click each individual cell or click and drag over ranges you wish to highlight. The color will be applied to every cell you click.

4
Deactivate the tool

Once you are finished applying the color, press the 'Esc' key on your keyboard to turn off the Format Painter.

Use Format Painter for a Single Repeated Color
Limitations: This method only works efficiently for one color at a time. If you need to switch colors, you must drop the tool, select a differently colored cell, and double-click the Format Painter again.
WPS Spreadsheet Efficiency

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. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your existing spreadsheet document.
  2. 2. Apply single-color formatting: Format a cell, double-click 'Format Painter' on the Home tab, and click your target cells.
  3. 3. Enable VBA macros for advanced coloring: Go to the 'Tools' tab and click 'Macro' to open the VBA Editor for custom scripts.
  4. 4. Save your automated workbook: Insert your cell-highlighting VBA code and save the file as a Macro-Enabled Workbook to retain the functionality.
Fully supports VBA Macros (.xlsm) to automate dynamic cell highlighting.Highly compatible with Microsoft Excel formatting and features.Persistent double-click Format Painter for easy single-color application.Free and lightweight alternative for everyday spreadsheet tasks.
microsoft office alternative - wps office

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.