Formatting Issues

Highlight Excel Person IDs With Multiple High-Severity Violations

Natalie TaylorNatalie Taylor Nov 12, 2026 869 views

Question details

Highlight a Person ID when the same person has at least two records with a severity value of high.

Highlight Excel Person IDs With Multiple High-Severity Violations
Product
Microsoft Excel 2016
Device & OS
not provided
Scenario
A worksheet lists Person IDs in column B and violation severity values in column D.
Observed behavior
The desired result is for every qualifying Person ID cell in column B to receive conditional formatting when that person has more than one high-severity violation.
Before you start

Confirm that Person IDs are in B2:B6 and severity values are in D2:D6. The severity entries must use the same text value, such as high, without unintended spaces.

Solution 1Recommended

Create a COUNTIFS rule for Person IDs with two or more high-severity violations

Use this rule when you want Excel to evaluate all records for each person and highlight every matching Person ID cell.

COUNTIFS counts rows where the Person ID matches the current row and the severity is high. The rule returns TRUE when the count is greater than 1.

1
Select the Person ID cells

Select the range $B$2:$B$6 that contains the Person IDs you want to highlight.

2
Open a formula-based conditional-formatting rule

On the Home tab, select Conditional Formatting > New Rule > Use a formula to determine which cells to format.

3
Enter the COUNTIFS formula

In the formula box, enter =COUNTIFS($B$2:$B$6,B2,$D$2:$D$6,"high")>1. Keep the ranges absolute with $ signs, but leave B2 relative so Excel evaluates each row.

4
Choose the highlight format

Select Format, choose a fill color or other formatting for qualifying Person IDs, then click OK. Confirm that Applies to is set to =$B$2:$B$6.

Create a COUNTIFS rule for Person IDs with two or more high-severity violations
Expected result: Every occurrence of a Person ID is highlighted when that person appears in at least two rows whose severity is high.
Conditional Formatting in WPS Spreadsheets

Highlight Repeated High-Severity Violations in WPS Spreadsheets

WPS Spreadsheets can apply the same COUNTIFS-based conditional-formatting logic to identify Person IDs with two or more high-severity violations. Select the ID range, create a formula rule, and apply a highlight format to the matching IDs.

  1. 1. Select the Person ID range: In WPS Spreadsheets, select the Person ID cells, for example B2:B6.
  2. 2. Create a conditional-formatting rule: Open Home > Conditional Formatting > New Rule and choose the option to use a formula.
  3. 3. Enter the violation-count formula: Enter =COUNTIFS($B$2:$B$6,B2,$D$2:$D$6,"high")>1 in the rule formula field.
  4. 4. Set a highlight style: Choose the fill color or font style for matching Person IDs, then confirm that the rule applies to B2:B6.
Apply COUNTIFS conditional formatting to flag people with multiple high-severity violations.Open and edit Microsoft Excel .xlsx and .xls worksheets with compatible formulas and formatting.Use a familiar spreadsheet interface for rules, formulas, and cell styles.Work with a free, lightweight office suite for ongoing violation tracking.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula use B2 instead of $B$2?

B2 is intentionally relative. As conditional formatting evaluates each row in the Applies to range, it changes to B3, B4, and so on, while the two lookup ranges remain fixed.

How can I highlight the entire violation row instead of only the Person ID?

Select the full row range, such as $A$2:$D$6, and use the same formula: =COUNTIFS($B$2:$B$6,$B2,$D$2:$D$6,"high")>1. The locked column in $B2 keeps the Person ID lookup in column B.

Can I highlight a person with exactly two high-severity violations only?

Yes. Change the final condition from >1 to =2: =COUNTIFS($B$2:$B$6,B2,$D$2:$D$6,"high")=2.

Does this rule treat High and high as different values?

COUNTIFS text matching is generally not case-sensitive, so High and high are counted alike. However, extra spaces or different text such as high severity will not match the criterion "high".