Conditional Formatting different color same criteria

p9j123

Active Member
Joined
Apr 15, 2014
Messages
288
Office Version
  1. 2013
Platform
  1. Windows
Hi,

I need help on setting a conditional formula. I need the cell to be colored differently once there is already a gap.
Each X represent a column, the first 5 column should be color Red, next 5 X is blue, next 5 X is green. Colors can be anything as long as they are different from each other.

X X X X X A X X X X X B X X X X X
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Can someone help me on this please? Sorry for reviving this post
 
Last edited:
Upvote 0
To put 3 colors you need to create 3 CF.
You could put an image with real data of what you have and with colors.
And what would be the condition to put the red, to put the next color and the last color.
Maybe a macro is necessary.
 
Upvote 0
Thanks for your response @DanteAmor

That's exactly it, the X is the condition, however, the color changes if there is a gap in between, the first 5 X should turn red and since there is a different content("A") after the first 5 X then the next subsequent Xs should be blue and since there is a different content("B") after the next group of X the subsequent X should change to a different color as well.
 
Upvote 0
Thanks for your response @DanteAmor

That's exactly it, the X is the condition, however, the color changes if there is a gap in between, the first 5 X should turn red and since there is a different content("A") after the first 5 X then the next subsequent Xs should be blue and since there is a different content("B") after the next group of X the subsequent X should change to a different color as well.


They are always 5 x, or can be any number of x
 
Upvote 0
Sorry I have so many doubts, but your example is not very clear and precise.
Some considerations are missing, for example:

a a a a a b b b b b b x

a a a a a x x b b b b b x

What colors are applied in the previous cases?
 
Upvote 0
thanks for your patience @DanteAmor

We are only highlighting X, so on your first example the sole X should be highlighted as Red.

On the second example, first 2 x's should be Red and the last x after be should be blue.
 
Upvote 0
thanks for your patience @DanteAmor

We are only highlighting X, so on your first example the sole X should be highlighted as Red.

On the second example, first 2 x's should be Red and the last x after be should be blue.

I can not find a way to do it with CF, could it be with a macro?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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