How to skip blank dates in scatter chart

saitken

New Member
Joined
Jan 6, 2013
Messages
39
Office Version
  1. 365
Platform
  1. MacOS
Hello

I have a column of dates to plot against percentage on one sheet.
The data is copy/paste/link from another sheet.
Some of the rows in the original data have no date and the length of the column with dates will change as I add dates.
The dates in the original sheet which are blank come over as '00 January 1900' when I copy/paste/link into the sheet to create the chart.

How can I create a scatter chart which misses out the blank dates (including blanks within the dataset and at the end of it?

I think a dynamic chart does this but not sure how to skip blanks within the data set as well as after.

My chart below (I have changed the x-axis scale to cover the range of dates)

Any help would be much appreciated.

Thank you

1690802612638.png
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
try Using the NA() function for your date values:

Excel Formula:
=NA()

1690814092691.png
 
Upvote 0
Thanks. But on a scatter line chart, that leaves gaps in the line.
The blanks need to be eliminated from the dataset so as to have a continuous set of dates for charts to work in Excel.
I can simply filter or sort the dates to remove the blanks but I was hoping to automate this as I have a number of rows of data which changes regularly - the above was just an example.

I found a way of doing it using by adding another column and the formula =IFERROR(INDEX($B$5:$B$12,SMALL(IF(ISBLANK($B$5:$B$12),"",ROW($B$5:$B$12)-MIN(ROW($B$5:$B$12))+1), ROW(A1))),"") . This creates a new list with blanks removed. But as my data is copied and linked from another list of dates, Excel didn't recognise the linked data as blanks unless I manually deleted the linked formula in each cell with blanks. I tried making the blank cells in the original data as ="", so they are truly blank, but to no avail. It seems a cell with a linked formula in it can never be considered as a blank by Excel!

Perhaps the above formula can be changed so it looks for the blanks which are '00-Jan-00' by default. But I don't know how.

I'd like to be able to scatter plot the data in col C without having to copy the data into col D and doing a manual sort. I suppose a Macro could do it? I'm not good on Macros!

1690823300400.png
 
Upvote 0
Okay, my suggestion would be to not use a scatter graph but a line chart.
With a secondary column to fill your dates for the NA values:

Mr excel questions 53.xlsm
ABCD
1% Date% 2
25%2023-04-19#N/A
310%2023-04-19#N/A
414%2023-04-27#N/A
519%2023-06-13#N/A
624%2023-06-19#N/A
729%2023-06-21#N/A
833%2023-06-21#N/A
938%2023-06-21#N/A
1043%2023-06-21#N/A
1148%2023-06-27#N/A
1252%#N/A2023-06-27
1357%2023-07-13#N/A
1462%#N/A2023-07-13
1567%2023-07-10#N/A
1671%2023-07-10#N/A
1776%2023-07-10#N/A
1881%2023-07-10#N/A
1986%2023-07-10#N/A
2090%2023-07-10#N/A
2195%2023-07-14#N/A
22100%2023-07-14#N/A
23100%#N/A2023-07-14
24100%#N/A2023-07-14
25100%#N/A2023-07-14
26100%#N/A2023-07-14
27100%#N/A2023-07-14
saitken
Cell Formulas
RangeFormula
B12,B23:B27,B14B12=NA()
C2:C27C2=IF(ISNA(B2),IF(ISNA(B1),C1,B1),NA())




1690837224431.png
 
Upvote 0
Ok thanks but....if 7 of the dates do not exist my percentage y-axis values needs to reflect this and so the total would be less than 100%, as in my example graph above which shows the actual 57%.
But thanks for your help. So the only solution to do this would be a way of sorting the dates oldest to newest and have them as continuous column of dates. As I say, this is easy to do manually using a filter or sort. But I am wanting automate it.

In the data below, the dates in col C are linked from another sheet and so blanks are '00-Jan-00'. I want to automate the graph creation from the % and dates data. I can copy the data and filter to get col D, then copy-fill the % so they are correct and then adjust the data range to stop at row 14 in the chart but this is a pain every time!

1690903463580.png
 
Upvote 0

Forum statistics

Threads
1,215,093
Messages
6,123,067
Members
449,090
Latest member
fragment

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