Conditional Formatting

  • Thread starter Thread starter Neil Greenough
  • Start date Start date
N

Neil Greenough

I have three columns in a spreadsheet - name, address, telephone and reason.

Now in each column, I want to format the columns so that if the same, for
example, address appears twice within any row in the column, the cell colour
is changed to green. If it appears three time, it changes to amber and if it
appears four times it changes to red.

Any suggestions?
 
One way:

Assume addresses in B2:Bxxx. With B2 the active cell:

CF1: Formula is =COUNTIF(B2,B:B)=4
Format1: <patterns>/<red>

CF2: Formula is =COUNTIF(B2,B:B)=3
Format2: <patterns>/<yellow>

CF3: Formula is =COUNTIF(B2,B:B)=2
Format3: <patterns>/<green>
 
Select the range (whole column???), I used column A.

Then with A1 the active cell
format|Conditional formatting
formula is:

=countif(a:a,a1)>1
give it a nice format.

====
Personally, I'd use a helper column to the right of each and put this formula in
it:
=countif(a:a,a1)
and drag down.

Then I could apply data|filter|autofilter to show the values greater than 1.

Formatting is nice, but about all you can do is look at it.

You may want to read some of Chip Pearson's techniques for dealing with
duplicates:
http://www.cpearson.com/excel/duplicat.htm
 
Oops. Never mind.

Dave said:
Select the range (whole column???), I used column A.

Then with A1 the active cell
format|Conditional formatting
formula is:

=countif(a:a,a1)>1
give it a nice format.

====
Personally, I'd use a helper column to the right of each and put this formula in
it:
=countif(a:a,a1)
and drag down.

Then I could apply data|filter|autofilter to show the values greater than 1.

Formatting is nice, but about all you can do is look at it.

You may want to read some of Chip Pearson's techniques for dealing with
duplicates:
http://www.cpearson.com/excel/duplicat.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top