Change cell color on cell value change

delta_negative

New Member
Joined
Mar 11, 2013
Messages
37
Is there a way to monitor a range of cells and change the cell color of the currently changing cell only to create a blinking effect and then returning cell color to original cell color?

Appreciate any help.
 
Last edited:

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
How is the data changing? By entering data directly in the cell or by formula?
 
Upvote 0
Here is a simple change event routine. I hard coded the range to look in so it only effects cells in the range B2:H7.

Not sure I would want to use a sheet that had this behavior. But I'm not writing for a user.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oldColor As Long
Dim flashcount As Integer
Dim delayStart As Single


If (Not Intersect(Target, Range("B2:H7")) Is Nothing) Then
    oldColor = Target.Interior.Color
    For flashcount = 1 To 3
        delayStart = Timer
        Target.Interior.Color = RGB(255, 0, 0)
        Do While Timer < delayStart + 1
            'DoEvents
        Loop
        delayStart = Timer
        Target.Interior.Color = oldColor
        Do While Timer < delayStart + 1
            'DoEvents
        Loop
    Next
End If
End Sub
 
Upvote 0
What range of cells are being updated to change the results of the formulas?
 
Upvote 0

Forum statistics

Threads
1,214,897
Messages
6,122,141
Members
449,066
Latest member
Andyg666

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