title: Copying data from word table cell throws type mismatch error
body: <p>Thanks for looking into this.</p>
  <p>I am trying to get values from word table into variable. For most part it works but for the last part I could not. Error is in this below line after search text is like &quot;<em>Interest Payment Dates (t)</em>&quot;
  <code>retVal = pTable.Cell(oRow.Index+1, 5)</code>
  my guess is that because it looks like there is a table inside the bigger table. Any suggestion regarding how do I get dates highlighted in yellow into my retVal array? Pls see image</p>
  <pre><code>Public Function GetCellValue(ByRef pTable As Word.Table, ByVal pRow As Long, ByVal otext As String) As Variant
  On Error GoTo Err_GetCellValue
  
  Dim procName As String
  Dim retVal As Variant
  Dim strValue As String
  Dim oRow As Variant
  Dim oCell As Variant
  Dim found As Boolean
  Dim DQ As Variant
  
  procName = &quot;basGeneral::GetCellValue()&quot;
  found = False
  
  For Each oRow In pTable.Rows
  
  For Each oCell In oRow.Cells
  
  
  
      If oCell.Range.Text Like otext Then
          
          
          If otext Like &quot;*Interest Payment Dates (t)*&quot; Then
              retVal = pTable.Cell(oRow.Index+1, 5)
                      
          Else
              retVal = pTable.Cell(oRow.Index, 3)
          
          End If
  
          retVal = WorksheetFunction.Clean(retVal)
          DQ = Chr(34)
          
              If IsNumeric(retVal) Then
                  retVal = Replace(retVal, DQ, &quot;&quot;)
              End If
          
           found = True
           Exit For
      End If
  
  Next oCell
  
  If found = True Then Exit For
  
  Next oRow
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Txnxf.png" rel="nofollow noreferrer">Word file to copy specific data</a></p>