How to Select Excel Cells with a Specific Cell Style
Question details
The user wants to locate and select all cells in a spreadsheet that have a specific cell style applied.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Finding cells with specific formatting to modify them, review data, or standardize the worksheet design.
- Observed behavior
- The user needs a method to identify and select cells based on their applied style rather than their text or number content.
Ensure your worksheet is unprotected, as protected sheets may restrict your ability to select, find, or modify formatted cells.
Use Find and Replace to Select by Format
The built-in Find and Replace tool allows you to pick a format directly from an existing cell and locate all matching cells in the worksheet.
This is the most straightforward method for users who want to quickly highlight or modify cells sharing the exact same formatting attributes without writing any code.
Go to the Home tab on the ribbon, click 'Find & Select' in the Editing group, and choose 'Find' (or simply press Ctrl+F).
Click the 'Options' button in the Find and Replace dialog box to reveal advanced search settings.
Click the drop-down arrow next to the 'Format' button and select 'Choose Format From Cell'.
Your cursor will change to an eyedropper icon. Click on a cell in your worksheet that has the specific style you want to find.
Click 'Find All' to generate a list of all matching cells at the bottom of the dialog. Click on one of the results in the list and press Ctrl+A to select all matching cells in the worksheet.

Use a VBA Macro to Find Cells by Style Name
For repeated tasks or searching across an entire workbook, a VBA macro can automatically loop through cells and find a specific style by its name.
Easily Find and Manage Cell Styles in WPS Office
WPS Spreadsheet offers powerful Find and Replace tools that are fully compatible with Excel, allowing you to quickly locate and select cells based on their formatting or styles.
- 1. Open your spreadsheet: Launch WPS Spreadsheet and open your document.
- 2. Access Find and Replace: Press Ctrl+F to open the Find and Replace dialog box.
- 3. Specify the format: Click 'Options', then use the 'Format' button to specify the cell style you are looking for.
- 4. Select all matches: Click 'Find All' to locate all cells with that style, then press Ctrl+A in the results list to select them.

Frequently Asked Questions
Can I replace the found cell style with a new one?
Yes. In the Find and Replace dialog, switch to the 'Replace' tab. Set the 'Find what' format to your current style, and set the 'Replace with' format to the new style, then click 'Replace All'.
Why does 'Choose Format From Cell' not find all visually identical cells?
The 'Choose Format From Cell' option looks for an exact match of all formatting attributes (font, borders, fill, alignment, etc.). If a cell looks similar but has even a slight hidden difference in formatting, it will be excluded from the search results.
Does the VBA method work on hidden sheets?
A VBA macro will loop through all worksheets, including hidden ones. However, if the code attempts to select or activate a cell on a hidden sheet, it will throw an error. You must unhide the sheet first or modify the code to skip hidden sheets.




