title: Sum Column in Table to variable
body: <p>I'm trying to sum up a column of a table in a word document. It's 3 column table, the length depends on the document. What I'm doing in the macro is the following:</p>
  
  <p>I want to sum up the numbers in column 2. Then I'm adding some certain lines (headings in first column, no numbers in column 2) and change the order a bit. But I had the issue that sometimes lines get overwritten (due to bad programming...), so I want to sum up the second column in the end and compare the result with the one before (like a checksum). </p>
  
  <p>How can I implement to sum up the values of the second table to a variable (not writing it into a cell), and compare it in the end?</p>
  
  <pre><code>Sub ModuleTest()
  
  Dim numrows As Long
  Dim col2 As Range
  
  numrows = ActiveDocument.Tables(1).Rows.Count
  
  Set col2 = ActiveDocument.Range( _
      Start:=ActiveDocument.Tables(1).Cell(1, 2).Range.Start, _
      End:=ActiveDocument.Tables(1).Cell(numrows, 2).Range.End)
  
  'Code to sum up values in range col2
  
  End Sub
  </code></pre>
  
  <p>I managed to define the range but now i want to sum it up to a variable.</p>