View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default Highlight rows if duplicates are found

Pierre wrote:
On Jan 20, 4:09 pm, Glenn wrote:
Pierre wrote:
Have a long list of peoples names and their companies.
Some of the cells contents are duplicated, but are always in groups if
they are.
Would like to highlight the entire row if a contact is repeated, to
show that duplicate in a block of its own.
Would also like to avoid having shading color duplicated if the
duplication contains the same number of entries. Lets say, an entry of
1, followed fy an entry of 1; avoiding them both beigh the same color
shading if an entry is not repeated, but to differentiate it from the
previous entry. A greenbar for a data block (dating myself. . .) would
look would be just fine. Can create helper columns.
Using Excel 2007
For example:
Jones, Bill - Axel Manufacturing (green)
Jones, Bill - Axel Manufacturing (green)
Ventura, Ace - Metal Fabricators (white)
Ventura, Ace - Metal Fabricators (white)
Ventura, Ace - Metal Fabricators (white)
Ventura, Ace - Metal Fabricators (white)
Cavanaugh, Gus - ACA Limited (green)
Webster, Mirriam - Books R US (white)
Webster, Mirriam - Books R US (white)
Cortez, Angel - Safeco Insurance (green)
King, Larry - CNN (white)
Big thanks for any ideas on it's approach.
Pierre

One way...assume your data above is in A2:A12. In a spare column (I'll use B),
enter this formula:

=IF(A2<A1,1,0)

Then use this for conditional formatting:

Formula Is =MOD(SUM($B$2:B2),2)

Select green for pattern.- Hide quoted text -

- Show quoted text -


Glenn, Thank you!

Pierre


You are welcome. Glad I could help.