PDA

View Full Version : Conditional format help



Poshfox
10-12-2008, 11:38 PM
Sorry to ask but I am struggling with what may appear to most on here to be a simple piece of code that changes cell colours........:banghead:

Here is my problem.

Cells
C64, C65, C66, C67 contain Names but I want them to change to yellow (the cell colour) if
Cells L64,L65,L66,L67 contain the same name.
I can use the normal conditional Format tool for 3 conditions but stuck with 4 :(

Could anyone point me to a piece of code that would do the trick?

Thank-you in advance

Bob Phillips
10-13-2008, 12:15 AM
Why do you need 4? Wouldn't CF with the formula

=C64=L64

not work?

Poshfox
10-13-2008, 12:28 AM
Sorry........my mistake, I forgot to also say this important part :banghead:

I want to check that Cell C64 is the same as L64 and L65 and L66 and L67
If any of the L cells = C64 then this is to turn the cell C64 Yellow

When using conditional Format I have done this
If cell is equal to then pointed the 3 conditions at the Cells in L
but I need for it to check 4 (L) cells.

I'm not sure if I have explained that any better sorry :(

Bob Phillips
10-13-2008, 01:02 AM
Still one formula

=AND(C64=L64,C65=L65,C66=L66,C67=L67)

Poshfox
10-13-2008, 01:54 AM
Thanks for your help on this xld but that doesn't seem to work

I understand your formula but I actually need it something like this

=AND(C64=L64,C64=L65,C64=L66,C64=L67)

so if at any point the cells L64:L67 are the same text as C64 then the Cell colour of C64 changes to yellow say.....

Your formula works only when comparing C64 with L64, C65 to L65 etc

My formula above doesnt work either, I'm sure its possible somehow though. My head is mush at the moment looking at it!

Basically If the word say "Cheltenham" is in Cell L64 or L65 or L66 or L67 then C64 (which contains the text "Cheltenham") changes colour

Sorry for being such a pain

Bob Phillips
10-13-2008, 02:17 AM
You are not being a pain, just useless at explaining what you want :devil2:

Try this formula

=COUNTIF($L$64:$L$67,C64)

Poshfox
10-13-2008, 02:23 AM
I knew you would understand in the end :devil2:

Thats fantastic and works a dream :friends:

Thanks so much for your patience and help xld :thumb

Bob Phillips
10-13-2008, 03:08 AM
Glad we got there, and hope that your first experience with VBAX has been positive and we will see you again.