Ask a question Report

Excel make cell flash red [Solved]

hugrl 4Posts Thursday February 5, 2009Registration date February 23, 2009 Last seen - Latest answer on Jun 29, 2012 07:43PM
Hello,
In Excel I can make cell red when formula is greater than 4 but how do I GET CELL TO FLASH Office 2003
And can you in same spreadsheet link page with name under dates to sheet containing name in row to a number under same date IE j bloggs under 30 Mar in weekly sheet to a 1 under same date in monthy sheet every time name appears ( 160 name to go in)
Read more 
Answer
+60
moins plus
Private Sub Flash_Cells()

Dim FlashColor As Integer
Dim MakeFlash As Range
Dim x As Integer
Dim TheSpeed
Dim i

'Just a random range of cells. Change it to whatever you want.
Set MakeFlash = Range("A1,C6,F3,H4")

For Each i In MakeFlash

If i.Value > 4 Then

FlashColor = 3 'Set the color to red

'Make the cell range flash fast: 0.01 to slow: 0.99
TheSpeed = 0.2

'Flash 7 times
Do Until x = 7

DoEvents
Start = Timer
Delay = Start + TheSpeed
Do Until Timer > Delay
DoEvents
MakeFlash.Interior.ColorIndex = FlashColor
Loop
Start = Timer
Delay = Start + TheSpeed
Do Until Timer > Delay
DoEvents
MakeFlash.Interior.ColorIndex = xlNone
Loop
x = x + 1
Loop

End If
Next i

End Sub
hugrl 4Posts Thursday February 5, 2009Registration date February 23, 2009 Last seen - Feb 23, 2009 07:21AM
thanks ok
Reply
MCH- Oct 26, 2009 01:08AM
I used you macro to make cells flash and It works great.I have 7 cells listed c3,d3,e3,f3,g3,h3,i3 They all flash can you tell how to make thecell that has high number only flash. Thanks
Reply
Sub_Novice- Jun 29, 2012 09:42AM
Would you please tell me exactly where to insert this code? i.e. under "new module", or "alt-F11" in that window? (I'm a less than a novice)
Reply
rizvisa1 4302Posts Thursday January 28, 2010Registration date ContributorStatus December 6, 2014 Last seen - Jun 29, 2012 07:43PM
depends on how you plan to use it.
Reply
Add comment
Answer
+13
moins plus
Drop this code all under "ThisWorkbook" in VBAProject window. Change anything in bold to fit your spreadsheet. This will actually flash yellow - change 6's to 3's if you want Red

Private NextFlash As Double
Private Const FR As String = "'[Name Of Your Workbook.xls]Name Of Your Sheet'!A3"
Sub StartFlashing()
If Range(FR).Interior.ColorIndex = 6 Then
Range(FR).Interior.ColorIndex = xlColorIndexNone
Else
Range(FR).Interior.ColorIndex = 6
End If
NextFlash = Now + TimeSerial(0, 0, 1)
Application.OnTime NextFlash, "ThisWorkbook.StartFlashing", , True
End Sub
Sub StopFlashing()
Range(FR).Interior.ColorIndex = xlColorIndexNone
Application.OnTime NextFlash, "ThisWorkbook.StartFlashing", , False
End Sub
Private Sub Workbook_Open()
ThisWorkbook.StartFlashing
End Sub
Private Sub Workbook_Close()
ThisWorkbook.StopFlashing
End Sub
jubei- Jul 27, 2009 03:44PM
Thank you dave, it works, it really works.
Reply
Jo- Mar 5, 2010 03:53PM
This has been really useful, thank you.

Does anyone have any simple way of making the flashing stop dependent on criteria. For example, how about if FR does not have pin in it?

I have tried to add in this:

If Range(FR).Value <> "pin" Then

but no luck so far. Any help greatly appreciated

Jo
Reply
rizvisa1 4302Posts Thursday January 28, 2010Registration date ContributorStatus December 6, 2014 Last seen - Mar 5, 2010 04:10PM
If you are talking about Dave code then make this change


change
If Range(FR).Interior.ColorIndex = 6 Then


to

    If Range(FR).Value <> "pin" Then
        Range(FR).Interior.ColorIndex = xlColorIndexNone
    
    ElseIf Range(FR).Interior.ColorIndex = 6 Then


This will flash if word pin is in FR, else it will not flash. Though from your comments i think you want to say that if pin is there dont flash else flash in that case change <> to =
Reply
salserajo 2Posts Friday March 5, 2010Registration date March 5, 2010 Last seen - Mar 5, 2010 03:57PM
Hi,

Thanks this has been really useful.

I was wondering if you can change this to make it so that the flashing stops when text is entered into the cell?

I have tried this:

If Range(FR).Value <> "Pin" Then
StopFlashing
End if

but can get it to work.

I want to be able to attract peoples attention to the flashing cell to add a pin. When they have entered one i want it to stop flashing. It will originally have PIN entry in the cell

Any help appreciated, only want a simple as possible a solution

Thanks

Jo
Reply
Add comment
This document entitled « Excel make cell flash red » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.

Not a member yet?

sign-up, it takes less than a minute and it's free!

Members get more answers than anonymous users.

Being a member gives you detailed monitoring of your requests.

Being a member gives you additional options.