Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to change the background colour on event?
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to change the background colour on event?
Use conditional formatting with a formula of
=COUNTIF($B2:$B$2000,$B2)1 See http://www.contextures.com/xlCondFormat01.html -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Leo Hamal" wrote in message ... 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to change the background colour on event?
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 "Leo Hamal" wrote in message ... 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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to change the background colour on event?
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change background colour | Excel Worksheet Functions | |||
Change background colour of a row if a particular cell has a value | Excel Discussion (Misc queries) | |||
change a cell background colour to my own RGB colour requirements | Excel Discussion (Misc queries) | |||
change background colour | Excel Discussion (Misc queries) | |||
lookup value and change background colour | Excel Programming |