vforbiedronka
vforbiedronka

Reputation: 73

Conditional formatting formula/vba

I have the following table where people are in either group 1 or 2 or 3.

enter image description here

What I want is to format (highlight) x differently when one person is in more than one group on one day. Is there any possibility to do this neatly without vba based on formulae only? If vba I do not have a nice idea how to approach this without simply browsing the entire table. How should I approach that?

Upvotes: 0

Views: 40

Answers (1)

Subodh Tiwari sktneer
Subodh Tiwari sktneer

Reputation: 9976

To achieve this with the help of the conditional formatting, follow these steps...

  1. Select the whole columns B:C.
  2. Home --> Conditional Formatting --> New Rule --> Use a formula to determine which cells to format --> in the box below "Format values where this formula is true", paste the formula given below
  3. Click on Format --> Font --> Choose the Bold italic and set the font color to red or as per your choice --> OK --> OK to finish.

Formula for conditional formatting:

=AND(B1="x",COUNTIFS($A:$A,$A1,B:B,"x")>1)

Upvotes: 1

Related Questions