SOLVED

Cause the row to cycle between to fill colors based on the content of a cell

Copper Contributor

I am using Office 365 locally installed.

I want to format a row based on the contents of one cell. The twist is that I would like the fill color to alternate between 2 colors repeatedly for a given time.

The plan is that when incorrect data is detected, the row "Flashes" and gets the user's attention.

I know I can use conditional formatting to change the color once, that's not what I want. It needs to cycle the colors.

For example, If I have data in a3-d3, If d3="ERROR SEEK ASSISTANCE", then trigger alternating colors.

 

6 Replies

@sstock 

=$D4="ERROR SEEK ASSISTANCE"

You can apply the rule for conditional formatting for two different ranges and formats.

=$B$4:$B$25;$D$4:$D$25
=$A$4:$A$25;$C$4:$C$25

These are the ranges the format applies to in the example.

conditional format.JPG

@OliverScheurich 

Ok, I didn't explain that very well. Let me try again.

I am trying to get the entire row to change colors, then a moment later, the entire row should change to another color. This should repeat for a predetermined amount of time, then stop cycling.

In effect, it should flash (Blink?) red then yellow then red then yellow and so on.

Is this possible?

best response confirmed by sstock (Copper Contributor)
Solution

@sstock 

Unfortunately i didn't understand what you want to do when i first replied. Alternating change of colors for a certain time can be done only with VBA not with formulas.

 
VBA is acceptable. Can you provide a sample of the needed code or point me to somewhere I can learn how this would be done in VBA?

@sstock 

Here is a link to VBA code which should do what you are looking for.

Make a Cell Blink | Microsoft Learn

well that never appeared in any of my searches. Thank you so much. I will try it out later today.
1 best response

Accepted Solutions
best response confirmed by sstock (Copper Contributor)
Solution

@sstock 

Unfortunately i didn't understand what you want to do when i first replied. Alternating change of colors for a certain time can be done only with VBA not with formulas.

 

View solution in original post