title: Row Numbers in Excel Table
body: <p>I have the following basic table:</p>
  
  <pre><code>1|
  2|    Title....
  3|
  4|
  5|    | Row Index | Type | Etc... |
  6|    | 1         | abc  | .....  |
  7|    | 2         | def  | .....  |
  8|    | 3         | ghi  | .....  |
  9|    | 4         | jkl  | .....  |
  </code></pre>
  
  <p>Note that the table does not start on Excel row 1. Technically <code>ROW()-5</code> would work, but I do not want to hardcode the actual row the table starts on.</p>
  
  <p>My formula for <code>Row Index</code> is:</p>
  
  <pre><code>=ROW()-CELL("row")+1
  </code></pre>
  
  <p>This works fine, except for when you edit another cell in the table. It seems that the formula assumes the row you edit is index 0 and starts the row count from there.</p>
  
  <p>For instance, if I were to edit a cell in row 3 in the above table, the <code>Row Index</code> values would look like this:</p>
  
  <pre><code>| Row Index | Type | Etc... |
  | -1        | abc  | .....  |
  | 0         | def  | .....  |
  | 1         | ghi  | .....  |
  | 2         | jkl  | .....  |
  </code></pre>
  
  <p>After each edit, I think have to re-edit a cell in the top row to get the <code>Row Index</code> values correct again.</p>
  
  <p>Is there a reliable way to display row numbers in a table?</p>