Conditional format - blank if zero

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
1,041
Office Version
  1. 365
Platform
  1. Windows
Hello folks,

I'm trying to put a conditional format into a linked spreadsheet so that if the source cell is blank, the linked cell is also blank rather than displaying a '0'. The cell formular is "=Sheet1!H5" etc.

Your help will be appreciated.

Mel
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Try:
Code:
[COLOR=blue]=IF(Sheet1!H5="","",Sheet1!H5)[/COLOR]
 
Upvote 0
Unfortunately, I get an error messgae stating that I cannot use a reference to another sheet for conditional formatting :-(

Mel
 
Upvote 0
Oops
No this is cell formula and NOT conditional formatting!
Sorry for the confusion :(
 
Upvote 0
1. The formula above works if you place it in the cell where you wanted to apply conditional formatting. Did you try that?

2. I do not think that conditional formatting can change content of the cell. It will only change formatting to highlight if the condition is met!
 
Upvote 0
Hi,

You cannot achieve this with CF. You have to change your original formula (as Taurean posted originaly) to something like:
=IF(Sheet2!A1="";""; < your original formula here ><YOUR here formula original>)

By the way, i think you can use a reference to another sheet for conditional formatting, naming the range of the other sheet (Scope = workbook)

HTH

M.
 
Upvote 0
Hi Taurean, Marcelo,

All sorted now. Thanks for your help

Mel
 
Upvote 0
Just to clarify a few alternatives as this can be accomplished with conditional formatting two ways:

First way is when the cell value is equal to zero and just set it as white text on white background.

You can also use a custom number format of "" if the cell is equal to 0 so it wont display anything.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,710
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top