Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-11-2024, 12:38 AM
Shelley Lou Shelley Lou is offline VBA Find last cell in Column 2 of Word table Windows 10 VBA Find last cell in Column 2 of Word table Office 2016
Expert
VBA Find last cell in Column 2 of Word table
 
Join Date: Dec 2020
Posts: 259
Shelley Lou is on a distinguished road
Default VBA Find last cell in Column 2 of Word table

Hi, apologises but don't think I understand - does this line of code find only the very last cell in Column 2 - I only need to change the very last semi-colon not all of them?
Reply With Quote
  #2  
Old 04-11-2024, 04:04 AM
Italophile Italophile is offline VBA Find last cell in Column 2 of Word table Windows 11 VBA Find last cell in Column 2 of Word table Office 2021
Expert
 
Join Date: Mar 2022
Posts: 538
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by Shelley Lou View Post
Hi, apologises but don't think I understand - does this line of code find only the very last cell in Column 2 - I only need to change the very last semi-colon not all of them?
Your code loops through the rows in the table. Unless there are vertically merged cells the last cell in a column will be in the last row of the table.

As you are using i as the row number the statement
Code:
 If i = .Rows.Count Then
indicates that you are in the last row and that rCell is, therefore, the last cell in column 2.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Find last cell in Column 2 of Word table What formula can I use to find the lowest cell in a column that has a value in it? EddyWD Excel 3 04-20-2016 09:29 PM
VBA Word - Find Specific Table - Prepend & Append Data to Each Cell jc491 Word VBA 3 12-02-2015 09:48 PM
VBA Find last cell in Column 2 of Word table VBA Table – Search All Tables - Find & Replace Text in Table Cell With Specific Background Color jc491 Word VBA 8 09-30-2015 06:10 AM
Find text within cell and return column and row title next to the name on a new sheet. tanyabowring@live.co.uk Excel Programming 2 03-26-2015 01:48 AM
How do I reference a merged cell in a multi column & row table in MS Word ('03')? jihanemo Word Tables 0 03-18-2009 08:33 AM

Other Forums: Access Forums

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