Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Traffic Lights

Im trying to find a way to, change the colour of a circle from white to
green, yellow or red according to a range of values in a excel cell.

Unfortunately, Im not experience in programming and Im not able to build
the code that can allow the customization of this circles that will function
as €śtraffic lights€ť.

Regards,

Pedro Serra
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Traffic Lights

Andy Pope has an example on his website at
http://www.andypope.info/charts/trafficlight.htm.

A simpler way might be just to use coloured cells. This is extracted from a
web page that I am building

Another useful technique that is used in management reports is to highlight
the data using the 'traffic lights' technique, on target items are in green,
items slightly slipping are shown in yellow, and big slippages are shown in
red.

The will be flagged as follows:

* green - estimated cost is less than or equal to budget
* yellow - estimated cost.is less than or equal to budget + 25%
* red - estimated cost is greater than budget + 25%

As well as showing the lights colours, the background is shaded to provide
emphasis.

The conditional formatting will be formula driven, and to avoid showing a
light on a blank line kit tests for no budget, as well as the spend status.

It would be very simple to do the highlighting by shading a cell, maybe the
status cell or one of the amount cells, such as the budget. Whilst this
works, it would be better to show as a traffic light shows it, a coloured
circle. This is achieved by using the Winding font.

To create this traffic lights, follow these steps:

* Step 1.
Select the first data row in the 'Status' column
Set the font of this cell to 'Winding' Enter a lower-case letter l in
the cell
Centre the text in this cell
Copy this cell down to the appropriate number of rows.


* Step 2.
Goto Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of
=AND(B2<"",D2<=B2)
Click the Format button
Select the Font Tab
Select bright green from the Color dropdown
Select the Pattern Tab
Select dark green from the palette
OK


* Step 3.
Goto Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of
=AND(B2<"",D2<=B2*1.25)
Click the Format button
Select the Font Tab
Select yellow from the Color dropdown
Select the Pattern Tab
Select dark green from the palette
OK


* Step 4.
Goto Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of
=AND(B2<"",D2B2*1.25)
Click the Format button
Select the Font Tab
Select red from the Color dropdown
Select the Pattern Tab
Select dark green from the palette
OK

OK the dialog, and it is all done.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Pedro Serra" wrote in message
...
I'm trying to find a way to, change the colour of a circle from white to
green, yellow or red according to a range of values in a excel cell.

Unfortunately, I'm not experience in programming and I'm not able to build
the code that can allow the customization of this circles that will

function
as "traffic lights".

Regards,

Pedro Serra



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Traffic Lights

Thanks Bob,

This is very near from what I was looking for but as I said I'm not very
experience in programming and what I need is to have only one circle that can
have 4 colours:

White - value in a cell is null
Green - value in a cell between 1 and 2
Yellow - value in a cell between 2 and 3
Red - value in a cell between 3 and 4

The colour of the circle should change according to the range defined. Do u
think u can send to my e-mail , an example with this,
because I cant discover the way to adapt your worksheet trafficlight to what
I was trying to get.

Thanks in advanced!

Pedro

"Bob Phillips" wrote:

Andy Pope has an example on his website at
http://www.andypope.info/charts/trafficlight.htm.

A simpler way might be just to use coloured cells. This is extracted from a
web page that I am building

Another useful technique that is used in management reports is to highlight
the data using the 'traffic lights' technique, on target items are in green,
items slightly slipping are shown in yellow, and big slippages are shown in
red.

The will be flagged as follows:

* green - estimated cost is less than or equal to budget
* yellow - estimated cost.is less than or equal to budget + 25%
* red - estimated cost is greater than budget + 25%

As well as showing the lights colours, the background is shaded to provide
emphasis.

The conditional formatting will be formula driven, and to avoid showing a
light on a blank line kit tests for no budget, as well as the spend status.

It would be very simple to do the highlighting by shading a cell, maybe the
status cell or one of the amount cells, such as the budget. Whilst this
works, it would be better to show as a traffic light shows it, a coloured
circle. This is achieved by using the Winding font.

To create this traffic lights, follow these steps:

* Step 1.
Select the first data row in the 'Status' column
Set the font of this cell to 'Winding' Enter a lower-case letter l in
the cell
Centre the text in this cell
Copy this cell down to the appropriate number of rows.


* Step 2.
Goto Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of
=AND(B2<"",D2<=B2)
Click the Format button
Select the Font Tab
Select bright green from the Color dropdown
Select the Pattern Tab
Select dark green from the palette
OK


* Step 3.
Goto Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of
=AND(B2<"",D2<=B2*1.25)
Click the Format button
Select the Font Tab
Select yellow from the Color dropdown
Select the Pattern Tab
Select dark green from the palette
OK


* Step 4.
Goto Menu FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of
=AND(B2<"",D2B2*1.25)
Click the Format button
Select the Font Tab
Select red from the Color dropdown
Select the Pattern Tab
Select dark green from the palette
OK

OK the dialog, and it is all done.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Pedro Serra" wrote in message
...
I'm trying to find a way to, change the colour of a circle from white to
green, yellow or red according to a range of values in a excel cell.

Unfortunately, I'm not experience in programming and I'm not able to build
the code that can allow the customization of this circles that will

function
as "traffic lights".

Regards,

Pedro Serra




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting using Traffic Lights Ruby Pro Excel Discussion (Misc queries) 6 May 14th 10 12:22 AM
Conditional format - 3 traffic lights James Excel Worksheet Functions 2 January 12th 09 05:39 PM
Conditional Formatting using 3 Traffic Lights Formula BureFreak Excel Worksheet Functions 3 May 22nd 08 07:28 PM
How do I use traffic lights in excel Shorty Excel Discussion (Misc queries) 5 December 23rd 04 03:23 AM
How do I get traffic lights in excel that change colour Shorty Excel Worksheet Functions 2 December 23rd 04 01:24 AM


All times are GMT +1. The time now is 06:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"