Conditional formatting

mahmed1

Well-known Member
Joined
Mar 28, 2009
Messages
2,302
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Guys,

How do i conditionally format each time there is a change.

i.e

Mark
Mark
Mark
Mark
Mark
Mark
John
John
John
John
John
Andrew
Andrew
Andrew
Andrew

so for mark have it green and when it changes to John have it red but when it changes back to Andrew have it green again etc...

Many Thanks
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
assuming your cells start A1 highlight your cells --- conditional format
1ST ---cell value is / equal to "Mark" format colour
2ND --- formula / = A1="John" format colour
3RD --- formula / =A1="andrew" format colour
 
Upvote 0
assuming your cells start A1 highlight your cells --- conditional format
1ST ---cell value is / equal to "Mark" format colour
2ND --- formula / = A1="John" format colour
3RD --- formula / =A1="andrew" format colour

Hi the problem with that is that it could be any value so therefore it will take forever to ="xxxx".

I need to have the cell colours change when the value changes.

Thank you
 
Upvote 0
you have me a little confused
do you want any change in your worksheet to change colour or just the 3 names you have shown
 
Upvote 0
Hi,

Maybe using a helper column, say, column X

Put in X1
1

Formula in X2 (assuming names in column A beginning in A1)
=IF(A2=A1,IF(X1=1,1,0),IF(X1=1,0,1))

Select A1:A? (A1:A1000 for example)
Then you can CF
1st rule
$X1 = 1 ---> Green

2nd rule
$X1 = 0 ---> Red

HTH

M.
 
Last edited:
Upvote 0
Try putting this CF condition on A2 and copying it downward

=(A1<>A2)

Thank you, i need to highlight all the cells one colour and when the value changes have it a different colour (all cells different colour) etc.....
 
Upvote 0
For conditional formatting you could use three condtitions like

=(MOD(COUNTIF(A:A,A1), 3)=0)
=(MOD(COUNTIF(A:A,A1), 3)=1)
=(MOD(COUNTIF(A:A,A1), 3)=2)

to give each block a different color. Some blocks would have the same color, but not neighboring blocks.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,726
Members
452,939
Latest member
WCrawford

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top