Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Flashing Cells.
by Allen Wyatt
(last updated January 12, 2018)
Many people use the conditional formatting features of Excel to draw attention to specific values or areas of their worksheets. For instance, a cell might be formatted so that its contents are displayed in red or in boldface if above or below a certain threshold.
What is missing, however, is a way to make the contents of a cell flash, or blink on and off. For such a feat, you are left to your own devices and the miracle of macros. By utilizing these tools, you can make cells blink by first designing a special style for the blinking cells, and then running a simple macro.
To create the special style, follow these steps:
Figure 1. The Style dialog box.
You can now apply the style to any other cells you desire in your workbook. Now create the macros (there are two of them), as follows:
Dim NextTime As Date Sub StartFlash() NextTime = Now + TimeValue("00:00:01") With ActiveWorkbook.Styles("Flashing").Font If .ColorIndex = xlAutomatic Then .ColorIndex = 3 .ColorIndex = 5 - .ColorIndex End With Application.OnTime NextTime, "StartFlash" End Sub Sub StopFlash() Application.OnTime NextTime, "StartFlash", schedule:=False ActiveWorkbook.Styles("Flashing").Font.ColorIndex = xlAutomatic End Sub
To start the items flashing, simply run StartFlash. The cells formatted with the Flashing style will alternate between red and white text approximately once a second. When you want to turn the flashing off, simply run the StopFlash macro.
There is one important thing to note about this macro: the variable NextTime is declared outside of the actual procedure in which it is used. This is done so that NextTime maintains its value from one invocation of StartFlash to the next.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7223) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Flashing Cells.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
Getting rid of formatting from a cell or group of cells can be done using several different techniques. This tip ...Discover More
When you enter something into a cell, Excel tries to figure out if your entry should be formatted in a particular way. ...Discover More
Need the contents of a cell to be shown in a direction different than normal? Excel makes it easy to have your content ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.