Highlight Excel Person IDs With Multiple High-Severity Violations
Question details
Highlight a Person ID when the same person has at least two records with a severity value of high.

- 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.
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.
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.
Select the range $B$2:$B$6 that contains the Person IDs you want to highlight.
On the Home tab, select Conditional Formatting > New Rule > Use a formula to determine which cells to format.
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.
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.

Extend the conditional-formatting formula for a larger data range
Use this option when your violation table contains more rows than B2:B6 and D2:D6.
Normalize severity text if the rule does not find expected matches
Use this option when values that look like high do not trigger the highlight because of spelling, capitalization, or extra spaces.
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. Select the Person ID range: In WPS Spreadsheets, select the Person ID cells, for example B2:B6.
- 2. Create a conditional-formatting rule: Open Home > Conditional Formatting > New Rule and choose the option to use a formula.
- 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. Set a highlight style: Choose the fill color or font style for matching Person IDs, then confirm that the rule applies to B2:B6.

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".




