The Computer Oracle

How to fill in missing dates in chart

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Ocean Floor

--

Chapters
00:00 How To Fill In Missing Dates In Chart
00:40 Accepted Answer Score 10
01:19 Answer 2 Score 14
01:47 Answer 3 Score 1
02:04 Answer 4 Score 0
02:20 Thank you

--

Full question
https://superuser.com/questions/770046/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#microsoftexcel #charts #microsoftexcel2013

#avk47



ANSWER 1

Score 14


Excel has a built-in chart option to deal with this issue.

  1. Select your horizontal axis.
  2. Right-click and select Format
  3. In Axis Options, look for Axis Type. Select the Date Axis radio button and Excel will automatically add the missing dates, while only plotting your data.

Here's what it looks like:

Missing Dates

This should work with either Line or Column charts.




ACCEPTED ANSWER

Score 10


I'm a big fan of vlookups. Assuming your data is in columns A and B, make a range of dates down column D using the autofill (type 11/1/14 in D1, then drag the bottom-right corner down). Then in E1 use:

=IFERROR(VLOOKUP(D1,A:B,2,FALSE),0)

Which should search in column A for every date and put the number in column B associated with it, or 0 if nothing is found (the IFERROR wrap is needed for that, otherwise it shows N/A). Then autofill column E and you should be able to make a chart on columns D and E. Takes up some space but it's easy and it works. You can hide it on another sheet if it looks too messy.




ANSWER 3

Score 1


You could just create an XY scatter plot with dates as X and values as Y. The spacing will be correct and the dates will appear in the X axis labels. Sort the values by date and use the connected line scatter plot type.




ANSWER 4

Score 0


If you right click on the chart and select "select data" a dialog box pops up. In the bottom left portion of this dialog box is a button for hidden and empty cells. It is here you can select zeros for missing information.