Highlight Excel Rows When a Cell Contains a Character
Question details
Highlight an entire row when a cell in a specified column contains a character.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Use conditional formatting to highlight rows when a cell in column B contains an at sign, such as in an email address.
- Observed behavior
- Rows whose column B cells contain @ should be highlighted across the selected range.
Identify the column to check and the first row of the range you want to format. The example below checks column B and starts at row 2.
Use a Formula-Based Conditional Formatting Rule in Excel
Highlight each selected row when its column B cell contains an at sign.
Select the range to highlight, such as A2:D100. Include every column you want the formatting to cover.
On the Home tab, select Conditional Formatting > New Rule, then choose Use a formula to determine which cells to format.
Enter =ISNUMBER(SEARCH("@",$B2)) in the formula box. Replace B with the column to check and 2 with the first row of your selected range.
Select Format, choose a fill color or another style, and select OK. Select OK again to apply the rule.

Highlight Matching Rows in WPS Spreadsheets
Use a formula-based conditional formatting rule in WPS Spreadsheets to highlight rows containing an at sign in a selected column.
- 1. Open your spreadsheet: Open WPS Spreadsheets and select File > Open to load your workbook.
- 2. Select the target range: Select the cells to format, such as A2:D100, starting with the first data row.
- 3. Create a formula rule: On the Home tab, open Conditional Formatting > New Rule and choose the option to use a formula to determine which cells to format.
- 4. Apply the format: Enter =ISNUMBER(SEARCH("@",$B2)), choose a format, and confirm the rule. Adjust B and 2 to match the column and first row in your selection.

Frequently Asked Questions
How do I check a different column for the character?
In the conditional formatting formula, replace $B2 with the appropriate column and starting row. For example, use =ISNUMBER(SEARCH("@",$C2)) to check column C starting at row 2.
Why is only one cell highlighted instead of the entire row?
Select all the columns you want to highlight before creating the rule. In Excel, you can also open Home > Conditional Formatting > Manage Rules and check the Applies to range.
Why does the formula use $B2 instead of B2?
The dollar sign keeps the rule checking column B across the selected columns. The row number remains relative, so Excel checks the corresponding cell in each row.
Do I need an IF formula for conditional formatting?
No. =ISNUMBER(SEARCH("@",$B2)) already returns TRUE or FALSE, which the conditional formatting rule can use directly.




