Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


How to make cell flash red in Excel?

In general, we highlight the cells with different backgrounds to make them out from others, but here, in this article, I introduce a VBA code can make the specific cells flash with red background to outstanding in Excel.

Make cell flash red with VBA

Select Specific Cells (select cells/row/columns based on one ore two criteria.)

doc select specific cells

arrow blue right bubble Make cell flash red with VBA

For making cells blink blink to attract users’ attention, here is a VBA code.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

1. Enable the sheet you want to flash cells, and press Alt + F11 keys to open Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and then paste below VBA code to the Module script. See screenshot:

VBA: Make cell flash red

Private Sub Flash_Cells()
    Dim xColor As Integer
    Dim xCount As Integer
    Dim xSpeed As Double
    Dim xStart As Double
    Dim xDelay As Double
    Dim xRg As Range
    Dim xTxt As String
    Dim xCell As Range
    On Error Resume Next
    If ActiveWindow.RangeSelection.Count > 1 Then
      xTxt = ActiveWindow.RangeSelection.AddressLocal
      xTxt = ActiveSheet.UsedRange.AddressLocal
    End If
    Set xRg = Application.InputBox("Select cells", "Kutools for Excel", xTxt, , , , , 8)
    If xRg Is Nothing Then Exit Sub
    For Each xCell In xRg
        If xCell.Value > 4 Then
            xColor = 3
            xSpeed = 0.6
            Do Until xCount = 20
                xStart = Timer
                xDelay = xStart + xSpeed
                Do Until Timer > xDelay
                    xRg.Interior.ColorIndex = xColor
                xStart = Timer
                xDelay = xStart + xSpeed
                Do Until Timer > xDelay
                    xRg.Interior.ColorIndex = xlNone
                xCount = xCount + 1
        End If
End Sub

doc flash cell 1

3. Press F5 key, and a Kutools for Excel dialog pops out for selecting cells you want to make flash, see screenshot:
doc flash cell 2

4. Click OK. Now the selected cell has been flash with red background.


(1) In the VBA code, you can change the background color (xColor = 3), blink speed (xSpeed = 0.6) and blink times (Do Until xCount = 20) as you want.

(2) This VBA code won’t add flash background to blank selection.

(3) This flash background will be removed automatically after the blank times finish.

doc download 1

Recommended Productivity Tools for Excel

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.