Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 396
  • Last Modified:

code or valadation to highlight cell yellow

I want to highlight a cell if the following orrors:

if c5 = "" and c6 = something then highlight c5
and if c6 = "" and c5 = something then highlight c6

when there is 'something' in c5 and c6 OR there nothing in c5 and c6 then NO highlighting.

Hi experts,
I need to do this to multiple double cell throughout my sheet.

example attached:

Cheers

Rob.
Highlighting.xlsx
0
RobJanine
Asked:
RobJanine
  • 3
1 Solution
 
redmondbCommented:
RobJanine,

Please see attached.

Conditional Formatting formula is ...
=OR(AND(MOD(ROW(),2)=1,D5="",D6<>""),AND(MOD(ROW(),2)=0,D5="",D4<>""))

Regards,
Brian. Highlighting-V2.xlsx
0
 
Saqib Husain, SyedEngineerCommented:
Try this formula

=MOD(COUNTA(D5,OFFSET(D5,2*(MOD(ROW(),2)-0.5),0)),2)*(D5="")
0
 
redmondbCommented:
Please note, the formula is "row-sensitive". So, if it "starts" on an even-numbered row then the formula should be...
=OR(AND(MOD(ROW(),2)=0,D5="",D6<>""),AND(MOD(ROW(),2)=1,D5="",D4<>""))
0
 
RobJanineAuthor Commented:
Works Great!!! Thanks
0
 
redmondbCommented:
Thanks, RobJanine!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now