# CONDITIONAL FORMATTING AFTER EVERY CHANGE (across all rows)

#### JuicyMusic

##### Board Regular

I have a small set of data with 3 columns on it. I need the conditional formatting to go across all the 3 columns based on a conditional formula in Column B.
I need the conditional formatting to be in column starting in cell B2.

The first row will always be green across all three columns. Green will be the initial color formatting.
Blue at the 2nd job number change - then back to green at the 3rd change in the job number. Back and forth like that for the length of the data.

1) If the job number in consequent rows are the same, then that cell should be green as well (column A and C of that row should be green as well). Could be the same for several rows. Same color then.
2) At the next job number change, the color for that cell should be blue (columns A and C of that row should be blue as well)….

I will attach a clean set of data and a set of data showing the correct color so you can see what the results should be. I'm doing this in case I'm not clear for you.

Column A: employee name
Column B: job number
Column C: date worked on job

Specifics:
Column C: The date order is the first sort. It is from older to newest date. It has to be that way.
Column B: This job number are sorted so that all the "like" job numbers are together from smaller to bigger

Thank you so much!

#### Attachments

• Capture_raw data set_no color coding.PNG
18.6 KB · Views: 5
• Capture_raw data set_WITH color coding added.PNG
19.4 KB · Views: 5

#### JuicyMusic

##### Board Regular
Hello Jason, Sorry for my delay in responding. I didn't go to page 2 of this post. The answer to your question is YES. Yes to your whole question please.

Thanks,

### Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

#### jasonb75

##### Well-known Member
It's been so long, I've forgotten what was happening with this thread. At a quick glance, I think that this should work but haven't tested it.

One for green and one for blue, check the 'Stop if true' box next to the first one to make it more efficient.
Excel Formula:
``=MOD(MATCH(\$B2,UNIQUE(\$B\$2:\$B2),0),2)=0``
Excel Formula:
``=MOD(MATCH(\$B2,UNIQUE(\$B\$2:\$B2),0),2)=1``
Any thoughts, Wayne?

#### JuicyMusic

##### Board Regular
Hi, I know what you mean. I was wondering if you would remember. Time goes by so quick.
I'm going to try your suggestion right now. TY!

Replies
1
Views
86
Replies
4
Views
92
Replies
11
Views
272
Replies
0
Views
101
Replies
2
Views
55

1,129,791
Messages
5,638,340
Members
417,021
Latest member
moon miner

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back