![]() |
#1
|
|||
|
|||
![]()
Hi,
I'm supplied Word documents that contain a table that has differing valid rows therefore I need a variable to count the valid rows. In Excel this would be something like: Sub Test() With ActiveSheet lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row MsgBox lastRow End With End Sub I can use the following within word vba to count rows excluding the header row but I don't appear to be able to get .End(xlUP) Dim row As Integer Dim excelApp As Object Set excelApp = CreateObject("Excel.Application") row = excelApp.Worksheetfunction.Clean(ActiveDocument.Ta bles(1).UsedRange.Rows.Count Any ideas how I can get a count of valid rows (based on Column 1)? TIA |
Tags |
cells word vba, vba tables macro |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
wheddingsjr | Excel | 4 | 09-01-2020 09:52 PM |
![]() |
bjh894 | Word | 9 | 05-18-2020 11:14 AM |
Looking for a macro for word count in one specific column of table, only rows with white background | mobj | Word VBA | 2 | 10-17-2019 03:09 AM |
simple way to count rows in a table? | bkcell | Word | 4 | 03-09-2015 09:06 PM |
Is it possible to count the columns between two points on a table? | bobsone1 | Excel | 2 | 08-14-2014 01:42 AM |