Search code examples
missing-datalibreoffice-calc

Include missing dates with missing values with libreoffice-calc


I searched a lot, but didn't find an answer to the following question:

Financial data often come as daily data but with missing dates (weekends, banking holidays ...). I would like to have those data really on a daily basis with missing values, where originally the dates were missing.

So far I did this in liberoffice-calc half-manually, which takes a lot of time. I didn't find ways to really automate this, as there is no fixed rule, which dates are missing.

Example:

I have:

21/12/18 1
27/12/18 2
28/12/18 3
02/01/19 4

I want:

21/12/18 1
22/12/18
23/12/18
24/12/18
25/12/18
26/12/18
27/12/18 2
28/12/18 3
29/12/18
30/12/18
31/12/18
01/01/19
02/01/19 4

Solution

  • I'm not familiar with liberoffice-calc. In Excel or Google Sheets, I would use a lookup table.

    In one tab of the spreadsheet, I was enter the dates I want in column A. In another tab, I would place the actual data I have. Then, in column B of the first tab, I would lookup the value for that day from the data on the second tab.