Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Flash Text in Excel With a Short VBA Macro

Create a brief, repeatable color flash in desktop Excel with VBA, or use conditional formatting for a persistent alert without macros.

Table of Contents

To make text flash briefly in desktop Excel, use a VBA macro that changes the font color and restores it after a few seconds. If you are flagging overdue items or exceptions in a shared workbook, use conditional formatting with a visible label such as Review needed.

Create a short flash in desktop Excel

  1. Save a copy of the workbook as an Excel Macro-Enabled Workbook (.xlsm). Use a test cell with uniformly formatted text.
  2. Press Alt + F11 on Windows to open the VBA editor, then select Insert → Module.
  3. Paste the macro below. Replace Sheet1 and A1 with your actual sheet name and cell address.

Instructions on how to create flashing text in Excel Picture 1

Instructions on how to create flashing text in Excel Picture 2

Option Explicit

Sub FlashText()
    Dim target As Range
    Dim originalColor As Long
    Dim i As Long

    Set target = ThisWorkbook.Worksheets("Sheet1").Range("A1")
    originalColor = target.Font.Color
    On Error GoTo RestoreColor

    For i = 1 To 2
        target.Font.Color = vbRed
        DoEvents
        Application.Wait Now + TimeSerial(0, 0, 1)
        target.Font.Color = vbBlue
        DoEvents
        Application.Wait Now + TimeSerial(0, 0, 1)
    Next i

RestoreColor:
    target.Font.Color = originalColor
End Sub

Return to Excel, press Alt + F8, select FlashText, and choose Run. Keep the target sheet visible. The macro runs once and Excel may briefly pause while it alternates colors. Use the file only where macros are allowed.

Optional: Assign it to a button

On the Developer tab, choose Insert → Button under Form Controls. Draw the button and assign FlashText. Right-click the button and choose Edit Text to rename it.

Older screenshots of the VBA editor and button setup

Instructions on how to create flashing text in Excel Picture 3

Instructions on how to create flashing text in Excel Picture 4

Instructions on how to create flashing text in Excel Picture 5

Instructions on how to create flashing text in Excel Picture 6

Instructions on how to create flashing text in Excel Picture 7

Highlight values without VBA

For a persistent alert, select the range and open Home → Conditional Formatting → New Rule. Set a rule for the value or formula you care about, apply a contrasting fill, and include text that explains the status.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.