Solved

Simple Conditional Formatting (Traffic Lights!)

Posted on 2014-01-24
5
156 Views
Last Modified: 2014-01-24
Hi,

See attachments which should be clear.

Simple enough conditional formatting which I can't get to work.

If Sales!B2 < TrafficLights!$C$2 then Sales!B2 should be Orange
If Sales!B2 < TrafficLights!$B$2 then Sales!B2 should be Red

This logic should apply to columns B to E in Sales Spreadsheet

Thanks for your time!
TrafficLights.xlsm
0
Comment
Question by:Patrick O'Dea
  • 2
  • 2
5 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 250 total points
Comment Utility
Hi,

pls try

Regards
TrafficLightsV1.xlsm
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 250 total points
Comment Utility
Select area starting at B2 and apply Conditional Formatting by formula with the following:

For CF Orange
=AND(B2>TrafficLights!$B2,B2<TrafficLights!$C2)

For CF Red
=B2<TrafficLights!$B2

Thanks
Rob H
0
 
LVL 48

Expert Comment

by:Rgonzo1971
Comment Utility
Hi,

In my solution the CF Red is before the CF Orange and I use Stop if True to avoid being Orange
with equivalent formulas to

Red:B2 < TrafficLights!$B2
Orange: B2 < TrafficLights!$C2

@RobHenson
Shouldn't your formula for Orange be
=AND(B2>=TrafficLights!$B2,B2<TrafficLights!$C2)


Regards
0
 
LVL 31

Expert Comment

by:Rob Henson
Comment Utility
I tried with the "Stop If True" box being ticked after first condition but didn't seem to be working for some reason, hence why I went for the less than one value for condition 1 and between two values for condition 2; indeed the second should have the >= rather than just >.

Thanks
Rob
0
 

Author Closing Comment

by:Patrick O'Dea
Comment Utility
Great stuff!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now