Excel Chart - x axis won't automatically resize when there is no data to display

Jasesair

Active Member
Joined
Apr 8, 2015
Messages
282
Office Version
  1. 2016
I'm charting very simple data from a set range - charting as a bar graph. This range will include blank/#N/A (I can adjust my formulas to whatever is needed) until new data comes in via formula...it's chronological so I have room for future dates' data.

I'm not able to create a chart that will ignore the currently empty future data. Instead it plots along the x axis leaving me with a condensed graph unnecessarily. Hoping this makes sense! I've tried things and have had no success.
Progess Data Chart.png
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
if you hide row 129 to 132 that should change it
 
Upvote 0
if you hide row 129 to 132 that should change it
I'm in need of a different way unfortunately, so that this graphs automatically based on the data in the table. It can't have any user intervention.
 
Upvote 0
#N/A should model as nothing, a setting on the graph itself
 
Upvote 0
Are you able to share how to do this? #N/A hasn't modelled as nothing for me so far. I've attempted an iferror "" added to my formula but this still plots along the x axis.
 
Upvote 0
If you select your chart, right click and select data source, the window that opens, bottom left has Hidden and Empty cells, click that and that gives a tock box for Show #N/A as an empty cell
 
Upvote 0
Ah yes, I found this fantastic sounding solution in my long-winded search only to find it's been removed in an update.
 
Upvote 0
Ah yes, I found this fantastic sounding solution in my long-winded search only to find it's been removed in an update.
It would be a fair bet that if you set that in an earlier version it would stay working in your current one, its been around for years, I would suspect that someone moved it

In VBA it would be
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.DisplayValueNotAvailableAsBlank = True

just make sure you select the correct chart
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,629
Members
449,241
Latest member
NoniJ

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