Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 12-19-2016, 04:04 PM
Guessed's Avatar
Guessed Guessed is offline Overcome issues in tables with vertically merged cells Windows 10 Overcome issues in tables with vertically merged cells Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,161
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
 

Tags
tables;formula;automating



Similar Threads
Thread Thread Starter Forum Replies Last Post
Overcome issues in tables with vertically merged cells How to vertically align a merged cell to fit text paik1002 Excel 6 09-20-2016 03:00 AM
Combining 2 tables into 1 and use Table2's column widths (hoping for workaround dealing merged cells CodingGuruInTraining Word VBA 24 10-07-2015 07:48 PM
Overcome issues in tables with vertically merged cells Table will not allow sorting because "cells are merged". I can't find the merged cells. wendyloooo Word Tables 1 05-26-2015 01:19 PM
Overcome issues in tables with vertically merged cells Unable to vertically center align texts in table cells? tinfanide Word 3 11-24-2013 06:37 AM
How to merge matching cells vertically? Odiseh Excel 1 01-02-2010 02:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:08 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft