title: Automatically adjusted date range in an Excel tables header row
body: <p>I would like to have a header row for my table in Excel consisting a date range (each month a column). The date range's beginning and end should be automatically adjusted according to the figures in the table. </p>
  
  <p><a href="https://i.stack.imgur.com/2V7NK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2V7NK.png" alt=""></a></p>
  
  <p>These figures are taken from another table via <code>SUMIFS</code> functions (one of the criteria is of course the date in the heather row). There aren't data for every month, but basically, I would like to have an output table which has starting month (first month when a figure occurs) and ending month (last month when a figure occurs) automatically adjusted. And I want to see the months without figures (between the two extremes) too. Date range cannot be taken from the other table. Any idea how to plan this?</p>