Highlight duplicates where adjacent cell value meets criteria using conditional formatting in excel
This blog article is one out of two articles on the same subject.
Highlight duplicates where adjacent cell value meets criteria using conditional formatting in excel
Highlight duplicates where adjacent cell value meets criteria using conditional formatting in excel part 2
Question: How do I only highlight duplicates that occur for the second time or more in a list (Column B) and where an adjacent cell value (Column A) must meet a criteria? See picture below.
Answer: Here is the conditional formatting formula: =IF((COUNT(IF(($B$2:$B2=$B2)*($A$2:$A2=$E$1), 1, ""))>1)*($A2=$E$1), TRUE, FALSE)
How to apply the conditional formatting formula in excel 2007:
- Select the range (A2:B16)
- Click "Home" tab on the ribbon
- Click "Conditional formatting"
- Click "New rule..."
- Click "Use a formula to determine which cells to format"
- Click "Format values where this formual is true" window.
- Type =IF((COUNT(IF(($B$2:$B2=$B2)*($A$2:$A2=$E$1), 1, ""))>1)*($A2=$E$1), TRUE, FALSE)
- Click Format button
- Click "Fill" tab
- Select a color
- Click OK!
- Click OK!
Change the category (E1) and see how different cells being highlighted.
Download excel example file.
highlight-duplicates-where-adjacent-column-meets-criteria-using-conditional-formatting.xls
(Excel 97-2003 Workbook *.xls)
Functions in this article:
IF(logical_test;[value_if:true];[value_if_false])
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE
COUNT(value1;[value2])
Counts the number of cells in a range that contain numbers
Related posts:
- Highlight duplicates where adjacent cell value meets criteria using conditional formatting in excel part 2
- Highlight duplicates where an adjacent column is in a date interval using conditional formatting in excel
- Highlight duplicates using conditional formatting in excel
- Highlight the second or more duplicates in two lists using conditional formatting in excel
- Highlight dates within a date range using conditional formatting
- Create a list of duplicates where adjacent cell value meets a condition in excel
- Highlight smallest duplicate value in a column using conditional formatting in excel
- Create a list of distinct values from a list where an adjacent cell value meets a criteria in excel
- Highlight duplicate values in a range using conditional formatting in excel
- Prevent duplicates using dynamic conditional formatting in excel




September 9th, 2009 at 5:11 pm
I have a list of equipment numbers that need the duplicates in that column highlighted - comparing all values regardless of Work Type, but only highlighting Work Type = TC. What would the formula be?
Work Type Equip # Result
PM RLF00424 FALSE
PM RLF01755 TRUE
PM RLF01890 FALSE
PM RLF00537 TRUE
PM RLF01530 FALSE
TC RLF01755 TRUE
TC RLF00579 FALSE
TC RLF00876 FALSE
TC RLF00537 TRUE
TC RLF00520 FALSE
September 9th, 2009 at 9:33 pm
Linda,
See this blog post: http://www.get-digital-help.com/2009/09/09/highlight-duplicates-where-adjacent-cell-value-meets-criteria-using-conditional-formatting-in-excel-part-2/