How to change the background colour on event?


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

Advertisements

P

Peter T

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
 
Ad

Advertisements

L

Leo Hamal

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.
 

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

Top