title: time in position - excel dates
body: <p>given the following excel table
  I'm trying to add a column with the number of days in a position, my problem is that the 'starting date' for an employee (column b) is the same. This is why I'm struggling with column D creation.
  For example: emp 111 the first row is DAYS(B2,C2), but for the second row should be (C2,C3).
  I tried to do it with index match array but I can't make it work.</p>
  <p>How do I do this kind of calculation?</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>emp_number</th>
  <th>start_working_date</th>
  <th>promotion_date</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>111</td>
  <td>2020-01-01</td>
  <td>2020-02-04</td>
  </tr>
  <tr>
  <td>111</td>
  <td>2020-01-01</td>
  <td>2020-04-23</td>
  </tr>
  <tr>
  <td>111</td>
  <td>2020-01-01</td>
  <td>2020-08-20</td>
  </tr>
  <tr>
  <td>112</td>
  <td>2020-03-01</td>
  <td>2020-05-01</td>
  </tr>
  <tr>
  <td>112</td>
  <td>2020-03-01</td>
  <td>2020-07-01</td>
  </tr>
  <tr>
  <td>113</td>
  <td>2020-04-01</td>
  <td>2020-08-01</td>
  </tr>
  <tr>
  <td>114</td>
  <td>2020-05-01</td>
  <td>2020-09-01</td>
  </tr>
  <tr>
  <td>115</td>
  <td>2020-06-01</td>
  <td>2020-10-01</td>
  </tr>
  </tbody>
  </table>
  </div>