Solved

Conditional Formatting, multiple blank or zero

Posted on 2011-02-21
5
361 Views
Last Modified: 2012-05-11
How would a conditional formatting statement be written to cover multiple conditions in a cell, such as a blank cell or a "0" (zero) in a cell. Column of cells actually.

Thanks for any assistance

0
Comment
Question by:dgd1212
5 Comments
 
LVL 5

Assisted Solution

by:roger_karam
roger_karam earned 200 total points
ID: 34948249
You can use an iff statement in the conditional formatting then copy it down. Example:

In cell A1, use the following formula for conditional formatting = if(OR(A1=0;A1="');1;0) , than drag the format down to the other cells

hope that helps
-RK
0
 
LVL 10

Expert Comment

by:shahzadbux
ID: 34949487
you may need to adjust roger_karam's formula to change the ; to , depending on your regional settings...
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 300 total points
ID: 34950288
In conditional formatting you don't really need an IF function, just a statement that returns TRUE or FALSE, so if you wanted to format column A if it contains "x" or "y" then this would suffice

=OR(A1="x",A1="y")

For your specific example, if the blanks are truly blank then Excel actually treats those as zeroes so in that case you only need a single condition

=A1=0

That will format any zero that actually contains a zero or is truly blank

If you want to apply to a whole column you just select the column first and then use the formula applicable to row 1, so the above formulas would work to format the whole of column A

regards, barry
0
 
LVL 5

Expert Comment

by:roger_karam
ID: 34957306
Barry's answer is the way to go. Used to the IF statement because i remember having trouble with older versions of excel without it.
0
 

Author Closing Comment

by:dgd1212
ID: 34975519
Thanks guys. Also didn't realize that a "blank cell" = 0
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

831 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