VBA Macro Code to copy data from a particular row in multiple tables to a different table in Word document

I had this question after viewing VBA Code to copy Text from different rows in one table to a single row in a different table.

The goal I need for the macro I need will be very easy to understand if you look at the diagram provided with this question.
The left half of the diagram shows how 5 tables look in my Word document. The right half of the diagram I would like the tables to look after the macro has done its job.

Bascially I have 5 tables in a Word Document. The first 4 tables have data in some rows and columns and some rows do not have any data in column 2. At the bottom of the document I have the 5th which does not have any data before the Macro Runs. I would like my Macro to copy data from both first and second column of the third row from Table 1 to Table 4 to Table 5.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


pls try
Sub macro()
For Idx = 1 To 4
    Set srctbl = ActiveDocument.Tables(Idx)
    Set tgttbl = ActiveDocument.Tables(5)
    Set rng = srctbl.Rows(3).Range
    rng.MoveEnd wdCharacter, -1 
    Set rng1 = tgttbl.Rows(Idx).Range
    rng1.Collapse wdCollapseStart
End Sub

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FaheemAhmadGulAuthor Commented:
Worked great!
Many thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.