TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 303
- Office Version
- 365
- Platform
- Windows
We have a file supplied to us in a certain format by a third party. A macro then copies data from that file into our own file where it is then manipulated according to our needs.
This month the macro failed and when I investigated it turns out the structure of the third party file has changed (they've added columns)......my macro is expecting key data to be present in certain columns.
The third party say they can't guarantee that the file will remain in the same format forever so this is a potentially re-occurring problem.
So is it possible for me to copy data from that file based on column name?
Assume my file has columns alpha, beta, gamma, delta and epsilon. The third party file might have columns named alpha, beta, gamma, theta, delta and epsilon. So I'd want to ignore theta and just copy the others over.
Can this be done?
Thank you for reading.
This month the macro failed and when I investigated it turns out the structure of the third party file has changed (they've added columns)......my macro is expecting key data to be present in certain columns.
The third party say they can't guarantee that the file will remain in the same format forever so this is a potentially re-occurring problem.
So is it possible for me to copy data from that file based on column name?
Assume my file has columns alpha, beta, gamma, delta and epsilon. The third party file might have columns named alpha, beta, gamma, theta, delta and epsilon. So I'd want to ignore theta and just copy the others over.
Can this be done?
Thank you for reading.