LUIS FREUND
asked on
Migrate data from one workbook to another workbook using VBA
Wanted to extract matching data based on a cell from one workbook to another workbook when there is a match.
On the New Data there is code to migrate the data but for some reason the data is not matching up...these are highlighted in yellow in the New data file. Those in yellow should be identical to the Old data that is being migrated from.
On column A, row 37 for example part number 100-109 on the New Data file should be exactly the same as 100-109 from the Old data when there is a match.
It appears that when the New Data file changes....meaning part numbers in column A get either deleted or added it no longer matches up when migrating the data.
C--Users-lfreund-Downloads-OLD-DATA.xlsx
C--Users-lfreund-Downloads-C-NEW-DA.xlsm
On the New Data there is code to migrate the data but for some reason the data is not matching up...these are highlighted in yellow in the New data file. Those in yellow should be identical to the Old data that is being migrated from.
On column A, row 37 for example part number 100-109 on the New Data file should be exactly the same as 100-109 from the Old data when there is a match.
It appears that when the New Data file changes....meaning part numbers in column A get either deleted or added it no longer matches up when migrating the data.
C--Users-lfreund-Downloads-OLD-DATA.xlsx
C--Users-lfreund-Downloads-C-NEW-DA.xlsm
ASKER
Hi Neeraj,
I get an error at this line of code...highlighted in yellow
If i = 36 Then Stop
I get an error at this line of code...highlighted in yellow
If i = 36 Then Stop
Ah... so sorry! I added that line to debug and forgot to delete.
Just delete that line and code will work fine then.
Let me know if you have trouble deleting that line.
Just delete that line and code will work fine then.
Let me know if you have trouble deleting that line.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Awesome!
ASKER
Thank you so much....works great!
You're welcome Luis!
Please give this a try and see if you are getting the correct output now.
Open in new window
C--Users-lfreund-Downloads-C-NEW-DA.xlsm