Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-23-2016, 08:12 AM
Jennifer Murphy's Avatar
Jennifer Murphy Jennifer Murphy is offline Counting rows with a macro? Windows XP Counting rows with a macro? Office 2007
Competent Performer
Counting rows with a macro?
 
Join Date: Aug 2011
Location: Silicon Valley
Posts: 234
Jennifer Murphy is on a distinguished road
Default Counting rows with a macro?

In this thread, Andrew Lockton posts a macro that will display the number of rows in a selected table:



https://www.msofficeforums.com/word/...ows-table.html

The macro is:
Code:
Sub CountRows()
   msgbox Selection.Tables(1).Rows.Count
End Sub
Is there a way to make this into a function that will return the number of rows in a table if called from a cell in that table?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting rows with a macro? Counting table rows in a page RavenSuzumiya Word Tables 1 06-09-2016 03:38 PM
VBA merging cells and counting Merged rows Snaybot Excel Programming 2 11-09-2015 03:56 AM
Counting unique visitors by ward, counting monthly visits by status, editing existing workbook JaxV Excel 9 11-14-2014 12:25 AM
Counting rows with a macro? Looking for VBA or Macro Counting a specific value occuring in single, random, changing cell? blackjack Excel Programming 1 09-11-2014 11:27 PM
Word counting macro for newly added portion? New Daddy Word VBA 24 09-30-2013 07:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:44 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