troubleshooting Question

Copy data programmatically between Excel files

Avatar of Jenkins
JenkinsFlag for United States of America asked on
Microsoft ExcelMicrosoft Office
3 Comments1 Solution81 ViewsLast Modified:
I have two Excel files (examples attached).

I've labeled one a Master File and the other a Transaction file.

The Master File gets much, but not all, of it's data from the Transaction File.

Each file contains around 200 rows.

The data is not arranged in the same order between the files and the order of each can't be changed.

There is a row name for each data row in each file but no naming convention between the two files.

What I mean by that is that there are instances where:

1. a particular row in the Master File may be related to a row in the Transaction file where the row
names DON'T match and you can't tell they are related.
2. a particular row in the Master File may be related to a row in the Transaction file where the row
names DO match.
3. a particular row in the Master File may be related to a row in the Transaction file where the row
names DON'T match exactly but are close enough to be able to tell they are related.

For reasons I won't bother to get into, the row names can't be changed.

I also am not going to link the files.


What I'm looking to be able to do is:

1. From the Master File, be able to click on a button that will open windows explorer and allow me to navigate to theTransaction File I want to select for "import".

2. Upon selecting the file, the program will, starting with the first (data) row name of the Master File (the row names are contained in column A of each file), search the row names in the Transaction File and if and when it finds the namein the Transaction File that is related to the name in the Master File, write the data in column 2 of the applicable row of the Transaction File to column 2 of the applicable row of the Master File.

3. Once the entire Transaction File is searched and a match is not found or a match is found and written to the Master File, the program should advance to the next row of the Master File and repeat the process.  Do this until the end of the Master File is reached.

If you look at the attached files and my notes in them, you should be able to see what I'm looking to achieve.


Thank you.
Master-File.xlsx
Transaction-File.xlsx
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros