Visual Indication

Peter Bellamy

Registered User.
Local time
Today, 20:30
Joined
Dec 3, 2005
Messages
295
Is there a way to produce a visual indication in a sheet based on the results of a formula? (I have written a lot of code in Access, but never in Excel !!)

I want to test a linked cell, when the sheet is opened, is equal, > or < than another cell in the sheet.

Cheers
Peter
 
Peter,

I'm not sure if you want to delve into the process of getting it to run when a sheet receives the focus, but a comparison of two cells should be fairly easy. Say, like this:
Code:
if range("linked cell") < range("the other cell") then
   [color=red]indicate the finding here[/color]
end if
 
Apologies if I've misunderstood the level of your question.

Have you tried "conditional formatting" (Format=>Conditional formatting) which sets the format of a cell according to some given criterion. So, for example, you could have the cell show in red if it is greater than the value of another cell.

You can also use simple formulas to show visual indicators. This is show a message in a cell (or not) based on the results of other cells:
=IF(B1>A1,"Too Much","")

Or go with code as ajetrumpet suggests for an elaborate approach e.g. a pop-up message or something.

Chris
 
Thanks both.
Chris your idea seems closer to what I want.
Doing the logical test was not the problem it was linking its outcome to a visual change.
I will try it and see when I am back at work at let you know !

Cheers
Peter
 
I have tried the conditional formatting and been able to make it work, thanks

What I have done is put some text and value in a couple of cells and changed the font colour to white. If the tested conditions change then the background becomes dark blue and the text/value appear as warning!

Peter
 

Users who are viewing this thread

Back
Top Bottom