You are here:

Excel/Formula for blinking or flashing range of cells

Advertisement


Question
Hello Bob,
I'd like to make a range of cells from E10:E500 to blink/flash if F10:F500 is blank or without value and will stop blinking/flashing if F10:F500 range of cells have value.

I seen another question like this but then only one cell is blinking/flashing.

This is what i mean of; whilst what i like to happen on my spreadsheet is by range.
Excel/formulas - blinking or flashing the results
Advertisement
Expert: Bob Umlas - 4/13/2004

Question
Hello Bob, I am using Microsoft Office Excel 2003 on Windows Professional XP.
I would like to have my formula (blink or flash the results. Example:
Cell A8: Size of rope eye  Cell B8:key in size.
Then at Cell B10:
+IF(AND(B8=" "),"SIZE OF ROPE EYE CANNOT BE BLANK"," ")

If cell B8 is blank, I would like SIZE OF ROPE EYE CANNOT BE BLANK    To blink or flash in cell B10.  


Answer
Right-click the sheet tab, select View Code, paste this in:
Private Sub Worksheet_Calculate()
  If Range("B8").Value = "" Then
      Blink "B10"
  Else
      Range("B10").Interior.ColorIndex = 0
  End If
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
  Application.Run Me.CodeName & ".Worksheet_Calculate"
End Sub

Insert a regular module, and paste this in:
Sub Blink(cell As String)
  If Range(cell).Interior.ColorIndex = 6 Then
      Range(cell).Interior.ColorIndex = 0
  Else
      Range(cell).Interior.ColorIndex = 6
  End If
  Application.OnTime Now + 1 / 86400, "doagain"
End Sub
Sub DoAgain()
  Application.Run Sheets("Sheet1").CodeName & ".Worksheet_Calculate"
End Sub


Thank you.
Rubenson

Answer
Right-click the sheet tab of where you want this to happen, select View Code, enter this:

Private Sub Worksheet_Change(ByVal Target As Range)
   Application.EnableEvents = False
   For i = 1 To 10
       Range("J10:J500").Value = False
       Application.Wait Now + 1 / 86400
       Range("J10:J500").FormulaR1C1 = "=rc6="""""
       Application.Wait Now + 1 / 86400
       Calculate
   Next
   Application.EnableEvents = True
End Sub

In cell F10, enter =IF(B8="","SIZE OF ROPE EYE CANNOT BE BLANK","") and fill down to F500.
Hide column J.
Select E10:E500, apply conditional formatting, use this formula (assues F10 is the active cell):
=J10
click Format, give a fill of whatever color you want.
That's it.  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Bob Umlas

Expertise

I`m a Microsoft Excel MVP (Most Valuable Professional) and have been since the inception of the program in 1995. I can answer every kind of Excel question except: API, Importing/exporting to other programs (powerpoint, word,...) Also check out my in-person training link at http://www.thumbtack.com/ny/new-york/excel-training/

Experience

Worked with MS Excel since version 0.99 (on the Mac!). Was contributing editor to Excellence Magazine, having written >300 articles. John Walkenbach said of me "I finally met someone who knows as much about Excel as I do."

Publications
Excellence, The Expert, Microsoft

Education/Credentials
BA in math, Hofstra University, 1965

Awards and Honors
MVP
Led sessions for the Convergence 2004-2006 seminar on Excel tips & tricks

©2016 About.com. All rights reserved.