Is it possible to display autoshapes based on conditions?

  • Thread starter Thread starter hce
  • Start date Start date
H

hce

Hi Everyone

I have created an "UP" arrow and "DOWN" arrow using "AUTOSHAPES
available on the drawing tool list.
My question is, is it possible for me to make the arrow appea
according to a cell value? For example, if the cell value is negative
the "DOWN" arrow would then appear and vice versa... Also, is i
possible for me to make a cell blink in colour again depending on it
value...?

I can't thank you guys enough especially those who have helped m
before... I guess the only way I can repay you guys is to "Pass i
forward"... like in the movie...

Thank you very much!!
 
Hi
for both issues you'll need VBA (using the event procedure). For the
blinking cell see the example code below.
Some notes: You won't be able to use Excel while the cell blinks ->
don't use this :-)

------
Dim Nexttime
Sub Flash()
NextTime = Now + TimeValue("00:00:01")
If ActiveWorkbook.Worksheets("Sheet1").Range("A1").value = 1 then
With ActiveWorkbook.Worksheets("Sheet1").Range("A1").Font
If .ColorIndex = 2 Then .ColorIndex = 3 Else .ColorIndex = 2
End With
end if
Application.OnTime NextTime, "Flash"
End Sub

Sub StopIt()
Application.OnTime NextTime, "Flash", schedule:=False
ActiveWorkbook.Worksheets("Tabelle3").Range("A1").Font.ColorIndex =
xlAutomatic
End Sub
 
UP and Down arrows:

Put this in your worksheet code module (right-click on the worksheet tab
and choose View Code):

Private Sub Worksheet_Calculate()
Me.Shapes("UP_Arrow").Visible = Range("A1") > 0
Me.Shapes("DOWN_Arrow").Visible = Range("A1") < 0
End Sub


Blinking:

I can't in good conscience tell you how to do this. It's an
abominable practice. But if you search if in the archives, you'll find
ways:

http://google.com/advanced_group_search?q=group:*excel*
 
Back
Top