How to change the background colour on event?

  • Thread starter Thread starter Leo Hamal
  • Start date Start date
L

Leo Hamal

Hi all,

First of all all the best for 2008 and keep up the good work.

Example :
A B C ...
name1 10 5 ...
name2 1 10 ...
name2 15 2 ...
name3 1 10 ...

In an active sheet in Excell, I run a VBA sub to detect the doubles in col
A.
What I would like is that the 2nd. field with "name2" would change the
background colour.
For the moment I have added a dummy collumn where I put an eye catcher.
After that I sort the file and change the background collour manually.
The rest of the collums are not important for this event.

Any ideas?

Thanks,
Leo.
 
Another one, since you specify "the 2nd. field", ie colour the 2nd identical
instance and subsequent duplicates. This counts duplicates 'above' the CF
cell rather than below

=COUNTIF($B$2:$B2,$B2)>1

Select B2:down before applying, later copy / paste (-special formats) to new
cells as necessary.

Regards,
Peter T
 
Sometimes I seem to look for problems.

Why trying VBA coding when a simple conditional formatting does the trick?

Thanks for opening my eyes.
Leo.
 
Back
Top