Solved

Set up conditional formatting so that it goes orange within two cells of a zero entry

Posted on 2016-10-05
4
47 Views
Last Modified: 2016-10-07
How can I apply conditional formatting to a sheet so that within 2 cells of it showing zero it goes orange. See desired effect attached sheet.
Thank you :-)
EE-CF-within-distance-of-blank-cell.xlsx
0
Comment
Question by:agwalsh
  • 2
4 Comments
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 41830566
Select the entire range from C5:N7, then go to Home|Conditional Formatting|New Rule

Select "use a formula to determine which cells to format" and enter formula:

=AND(C5<>0,OR(E5=0,D5=0))

Then click Format and choose from Fill tab.
1
 
LVL 10

Expert Comment

by:Ray
ID: 41830665
The above solves it if you mean within two to the RIGHT.  If you mean within two cells left or right, you need a couple more "OR" items :-)

Great answer from NBVC though!
0
 

Author Comment

by:agwalsh
ID: 41833216
@nbvc. That works well although I just had to tweak the formula to read as follows..(allowing for the different cells I put it into...). Thank you :-)
=AND($F4<>0,OR(G$4=0,H$4=0))
0
 

Author Closing Comment

by:agwalsh
ID: 41833218
Had to tweak it a tiny bit but worked beautifully :-)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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,…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

685 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