I have coded a macro that takes a data export from a companies proprietary system, manipulates some fields, and then saves as a new sheet to be parsed back into the system.
The problem is that I just found out that the format of the data export, as in column order and extra columns, will change from time to time. My workbook validates the export file by checking that each header corresponds to the column order of the sample export the company originally provided me.
However, this is static and hard-coded into the macro, whereas now I need a solution that will check the export file's header order/format, against a dynamically changing external control sheet and I have no idea how to do this
I ultimately want this external file to be updated whenever necessary, and for my macro, when run, to call this file, and compare it with the current export file awaiting manipulation. If the column order does not match up, then obviously the export file is not in the latest format and will not be dealt with.
Does anyone have any clues on how I can go about this? Any and all help will be thoroughly appreciated.
Thanks.
The problem is that I just found out that the format of the data export, as in column order and extra columns, will change from time to time. My workbook validates the export file by checking that each header corresponds to the column order of the sample export the company originally provided me.
However, this is static and hard-coded into the macro, whereas now I need a solution that will check the export file's header order/format, against a dynamically changing external control sheet and I have no idea how to do this
I ultimately want this external file to be updated whenever necessary, and for my macro, when run, to call this file, and compare it with the current export file awaiting manipulation. If the column order does not match up, then obviously the export file is not in the latest format and will not be dealt with.
Does anyone have any clues on how I can go about this? Any and all help will be thoroughly appreciated.
Thanks.