conditional formating

roninn75
3StarLounger
Posts: 238
Joined: 15 Feb 2013, 08:25

conditional formating

Post by roninn75 »

hi
i am highlighting a cell based on the adjacent cell value. i am achieving this by using the formula: =LEN(C5)>0 in D5 using conditional formula.

My question is however, when I now enter text into D5, how do I remove the cell highlighting that was applied? basically, the conditional formatting is fired when cell C5 has a value in it so D5 is highlighted. the rows are banded just as a matter of interest.

thank you for your assistance.

User avatar
HansV
Administrator
Posts: 78790
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: conditional formating

Post by HansV »

I'm sorry, I don't understand your question.

Conditional formatting will overrule directly applied formatting. What exactly do you want to remove?
Best wishes,
Hans

roninn75
3StarLounger
Posts: 238
Joined: 15 Feb 2013, 08:25

Re: conditional formating

Post by roninn75 »

when cell C5 has no text in it, then c5 and D5 has no highlighting except for the banded rows.

when text is entered into C5, then D5 will be highlighted (yellow)
when text is entered into D5, then the highlighting is removed and the cell reverts to its original banded row colour.

User avatar
HansV
Administrator
Posts: 78790
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: conditional formating

Post by HansV »

You could use this formula in the conditional formatting rule of D5:

=AND(C5<>"",D5="")
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: conditional formating

Post by Rudi »

Maybe this modification?

=AND(LEN($C5)>0,ISBLANK($D5))
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

roninn75
3StarLounger
Posts: 238
Joined: 15 Feb 2013, 08:25

Re: conditional formating

Post by roninn75 »

Thanks guys

with both formulae when i enter text in C5 , cell D5 colour changes to yellow. (D5 is blank) this is correct
if i delete the text in C5 the colour in D5 reverts. this is also correct.

however, if there is text in C5 and i enter text in D5, the colour should now revert. this does not happen though

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: conditional formating

Post by Rudi »

however, if there is text in C5 and i enter text in D5, the colour should now revert. this does not happen though
It seems to be working for me...Cell C7 and D7 has text and the formatting reverts (is removed).
Image 15.jpg
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

roninn75
3StarLounger
Posts: 238
Joined: 15 Feb 2013, 08:25

Re: conditional formating

Post by roninn75 »

sorry Rudi i forgot to delete the previous rule... my apologies. this works :)

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: conditional formating

Post by Rudi »

Ah... :thumbup:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.