Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-14-2017, 01:18 AM
ffinley ffinley is offline Merging two tables in WORD with VBA Windows 7 32bit Merging two tables in WORD with VBA Office 2010 32bit
Novice
Merging two tables in WORD with VBA
 
Join Date: Dec 2015
Posts: 5
ffinley is on a distinguished road
Default Merging two tables in WORD with VBA

Dear all

Could you please help me with this scenario?

I have two tables in WORD which I want to merge in the way described below. For ease of reference, I am calling the tables "TABLE 1" and "TABLE 2".

About the tables:


  • Tables 1 and 2 each have four columns.
  • The first column in each table contains a country in each cell plus some other text behind them (i.e. in the same cell in the first column).
  • There are some countries (plus text) in table 1 which are not in table 2 and some in table 2 which are not in table 1.

About the intended merging of the tables:
  • I would now like to go through all the rows in each table and if the first 13 letters of the countries in column 1 of each table match, then I would like to put column 1 of table 1, then column 1 of table 2, then column 2 of table 1, then column 2 of table 2, etc. (until all columns are next to each other, i.e. until column 4 of both tables).
  • If the first 13 letters do not match I would like to still display the row and then leave the cell for the table which does not have this entry blank.

Thank you very much for your help!!

By the way: I picked 13 letters to identify the countries because there are no double entries then (and I do not have another possibility to identify them because the cells with the countries have a lot of other (varying) text so that I cannot just look for identical cells in tables 1 and 2).

Best

Fin
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging different documents in one big document keeping the chapters, figure numbers and tables village Word 8 06-06-2016 04:16 AM
Merging two tables in WORD with VBA Word - Merging from Access kevinegg45 Mail Merge 2 10-30-2012 09:10 AM
Merging two tables in WORD with VBA Avoid merging tables b0x4it Word 4 06-14-2011 10:01 PM
Merging Multiple Word files into One Stattovic Word 0 01-06-2010 07:19 AM
HELP! Merging Excel to Word peevenjo Mail Merge 0 07-06-2007 03:24 PM

Other Forums: Access Forums

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