How to make a cell blink in "Excel"?

Posts
7
Registration date
Monday March 18, 2019
Status
Member
Last seen
September 20, 2019
-
Hi,

Re: "Microsoft Excel for Mac version 16.16.14 (190909)"
(aka "Excel for Mac 2016")

Q: referring to the cell the cursor is currently in,
how can I make the entire cell blink?

And can I add color?

And is it possible that if a cell is a result of a formula
to have it blink, in a color, if a certain value is reached?
Like under or over a certain number or other value?

My system:

Model Name: Mac mini
Model Identifier: Macmini8,1
Processor Name: Intel Core i7
Processor Speed: 3.2 GHz
Number of Processors: 1
Total Number of Cores: 6
L2 Cache (per Core): 256 KB
L3 Cache: 12 MB
Hyper-Threading Technology: Enabled
Memory: 64 GB
Boot ROM Version: 220.270.99.0.0 (iBridge: 16.16.6571.0.0,0)

Thanks!
See more 

7 replies

Posts
13036
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1473
0
Thank you
No you cannot make a cell animate. What you can do is, insert a small blinking animated gif into a cell.

Respond to ac3mark
Posts
13036
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1473
0
Thank you
Sub insertBlinker ()
With activesheet.pictures.insert ("e:\youblinker.gif")
With .shaperange
.lockaspectratio = msotrue
.width=15
.height = 15
End with
.left = activesheet.cells (row, column)
.top = activesheet.cells (row, column)
.placement = 1
.printobject = true
End with
End sub
Respond to ac3mark
Posts
7
Registration date
Monday March 18, 2019
Status
Member
Last seen
September 20, 2019
0
Thank you
Hello,

That looks like some kind of code you've written?

Not being a techie, I can be guided into what to do to implement
your solution (I am not totally lame), but I need "handholding" to
walk me through the process.

Can you give me more guidance with your solution?

Where to start?

What to click?

Thanks!
ac3mark
Posts
13036
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1473 -
First thing, Open the Developers tab In Excel. Step by step can be found here.

Then, Once you have VB for Applications opened (by clicking on VISUAL BASIC in the Developer Ribbon).

Then, The left hand side will be the Object Explorer. In the Object explorer, you will find a reference to the worksheet you are working on. Right click over it, and select Insert, Module.

Cut and Paste the BELOW code into the Module.

Function insertBlinker(nrow, ncol)
With ActiveSheet.Pictures.Insert("YOUR_FILE_PATH")
With .ShapeRange
.LockAspectRatio = msoTrue
.Width = 15
.Height = 15
End With
.Left = ActiveSheet.Cells(ncol, nrow)
.Top = ActiveSheet.Cells(ncol, nrow)
.Placement = 1
.PrintObject = True
End With
End Function


Save the workbook.

Now, in the sheet, you build the Trigger. In this case, we will use an if to evaluate if it needs a GIF or not.

So, lets say that the value to evaluate is at A10. So, in cell B10, we build:


=IF(A10<>"",insertBlinker(1,10))


The above code will insert an image at row 1, col 10, as long as A10 has some value in it.

Let me know how you need to customize it!
JohnDohe
Posts
7
Registration date
Monday March 18, 2019
Status
Member
Last seen
September 20, 2019
> ac3mark
Posts
13036
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
-
Hey Thanks!

I got as far as saving the workboot - had to change the file type to "macro-enabled workbook .xlsm".

As for the Trigger:

I need to make an entire column with the characteristic that the cell with the cursor should be the cell that
flashes. How to do this?

And, how to make the ROW of the cell that the cursor is in flash too?

MANY Thanks!
Respond to JohnDohe
Posts
13036
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1473
0
Thank you
Do you want it to go away when you move the cursor?
JohnDohe
Posts
7
Registration date
Monday March 18, 2019
Status
Member
Last seen
September 20, 2019
-
Hi!

Well, after filling in the cell, and cursoring down the cell above or below,
I want whatever cell and row the cursor is currently in to flash that animated gif.

Thanks!
ac3mark
Posts
13036
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1473 -
I will put something together.
JohnDohe
Posts
7
Registration date
Monday March 18, 2019
Status
Member
Last seen
September 20, 2019
-
Thanks!
Respond to ac3mark
Posts
13036
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1473
0
Thank you
Ok. So if you want this on sheet5, in the object explorer, click on sheet5. You ahould have a blank white work space. Paste the above function into that sheet in visual basic. Now, cut the below code and paste it on the same workspace as the last paste.

Private sub worksheet_selectionChange (byval Target as range)
Activesheet.pictures.delete
Nret = insertpic (target.column, target.row)
End sub
Respond to ac3mark
Posts
13036
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1473
0
Thank you
Well the gif wont animate unless you put it into a web browser object. So the blinking gif wont work, even though the code does highlight the activecell with an image.

I did write code that does make the activecell blink, but In order to make the highlighted cell go back to white, I have to clear all cells in the sheet, and I dont want to wreck your current formatting.

Let me know if you want to see this code.


JohnDohe
Posts
7
Registration date
Monday March 18, 2019
Status
Member
Last seen
September 20, 2019
-
Hi,

Thanks
ac3mark
Posts
13036
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1473 -
Function StartBlinking(ByVal Target As Range)
startloop:
    Nexttime = Now + TimeValue("00:00:01")
    With ActiveSheet.Range(Cells(Target.row, Target.Column), Cells(Target.row, Target.Column)).Interior
        If .ColorIndex = xlAutomatic Or .ColorIndex = 2 Then
        .ColorIndex = 3
        Else
        .ColorIndex = 2
        End If
    End With
   Do While Now < Nexttime
       DoEvents
   Loop
    GoTo startloop
 End Function




Instead of calling insert pic, call startblinking instead.

I will stick around until you are satisfied with MY WORK AND ASSISTANCE regardless if it is wanted or not! I am proud of my skillls and value helping and teaching others. I feel this has been valuable.
JohnDohe
Posts
7
Registration date
Monday March 18, 2019
Status
Member
Last seen
September 20, 2019
> ac3mark
Posts
13036
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
-
Thanks for the code.
Respond to ac3mark
Posts
1
Registration date
Friday September 20, 2019
Status
Member
Last seen
October 4, 2019
0
Thank you
What happens if an exert gives answer to this question?
ac3mark
Posts
13036
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1473 -
Give the answer in a code post, not a link post.
Respond to jotinkarter