View Single Post
 
Old 12-19-2016, 04:04 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,159
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Using Rows or Columns is problematic in non uniform tables. For that you will need to check each cell instead
Code:
Sub ExploreATable()
  Dim aCell As Cell, aRow As Row
  With Selection.Tables(1)
    If .Uniform Then
      For Each aRow In .Rows
        Debug.Print "Row: " & aRow.Index, "Cells: " & aRow.Cells.Count
      Next aRow
    Else
      For Each aCell In .Range.Cells
        Debug.Print aCell.RowIndex, aCell.ColumnIndex
      Next
    End If
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote