• 464K Members
• 9,791 Online
• 561K Conversations

New Contributor

# Blank cells show up as zeros in chart

Hello,

I'm taking simple averages of my data (e.g. =AVERAGE(B3:Q3)) and then plotting them as a line in a scatter plot. However, there are many gaps in my data, so my averages often return #DIV/0!. I'd like these values to show up as blanks in my graphs, but they're showing up as zeroes. I've also tried the formula =IFERROR(AVERAGE(B3:Q3),"") to change the #DIV/0! cells to blanks, but it makes no difference in the chart. Additionally, I've gone into "Select Data" and made sure that "Show empty cells as: Gaps" is selected. Why are my blanks still showing up as zeroes? I'm using Excel on Mac.

Thanks

5 Replies

# Re: Blank cells show up as zeros in chart

@Emilia480 to ignore what's happening, use this:

=IF(COUNTA(B3:Q3)=0;"";AVERAGE(B3:Q3))

This way, IF there are no value (and so the average of no values will export #DIV/0 error) then leave blank (""); else (so if there are some values, positive or negative), then apply AVERAGE.

You can do the same with SUM instead of COUNTA, but that means that a row with no values and a row with some value that summed are 0 are going to be counted as the same.

With COUNTA, a row with no values will be empty ("") and a row with value that sums 0 shows average 0 as it should be.

# Re: Blank cells show up as zeros in chart

@Arul Tresoldi thanks for you help. However, when I tried to use that formula, it says its not a valid formula. Any ideas why it's not working?

# Re: Blank cells show up as zeros in chart

@Emilia480 , try to change semicolons on commas within the formula

# Re: Blank cells show up as zeros in chart

@Sergei Baklan @Arul Tresoldi, I replaced the semicolons with commas, which allowed the formula to go through. Thanks for the suggestion. But the blank cells still show up as zeros in my chart. Not sure what I'm missing.

# Re: Blank cells show up as zeros in chart

For your formula you may return #N/A if error, like

``=IFERROR(<your formula>,NA())``

and check Show #N/A as empty cells together with Gaps for empty cells

Not to show errors in the table you may apply conditional formatting rule and format font to same color as background (white)

Please find this sample in attached file

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies