Report

Excel make cell flash red [Solved/Closed]

Ask a question hugrl 4Posts Thursday February 5, 2009Registration date February 23, 2009 Last seen - Last answered on Feb 21, 2017 at 03:32 AM by NA
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)
See more 
Helpful
+58
plus moins
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
Was this answer helpful?  
hugrl 4Posts Thursday February 5, 2009Registration date February 23, 2009 Last seen - Feb 23, 2009 at 07:21 AM
thanks ok
MCH- Oct 26, 2009 at 01:08 AM
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
Sub_Novice- Jun 29, 2012 at 09:42 AM
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)
rizvisa1 4482Posts Thursday January 28, 2010Registration date ContributorStatus January 6, 2016 Last seen - Jun 29, 2012 at 07:43 PM
depends on how you plan to use it.
JoeyL G- Jul 18, 2016 at 08:02 AM
I used in module, then "run" it.
To check the result, use side by side windows.
Reply
Helpful
+16
plus moins
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 at 03:44 PM
Thank you dave, it works, it really works.
Jo- Mar 5, 2010 at 03:53 PM
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
rizvisa1 4482Posts Thursday January 28, 2010Registration date ContributorStatus January 6, 2016 Last seen - Mar 5, 2010 at 04:10 PM
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 =
salserajo 2Posts Friday March 5, 2010Registration date March 5, 2010 Last seen - Mar 5, 2010 at 03:57 PM
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
NA- Feb 21, 2017 at 03:32 AM
Hi, is there a way to make the routine run once if a certain criteria is met? I used the code and pasted into the VB module for the worksheet Im playing with and set the parameters so that Cell B1 would Blink if cell A1 was False, then used a basic T/F IF statement on B1 =IF(A1=1, FALSE,TRUE), problem is I have to hit the run script button in the VB editor to get it to blink..
Reply

Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!