Hi,
I am struggling with a macro that is supposed to compare 10 columns of a sheet to a list of column headers, and add the columns that are missing (with just blank values).
The problem is that the list is dynamic, with different column headers depending on which "company" is chosen in a cell ("T5"; I am aware that the cell moves around in the sheet when columns are inserted, but in the real workbook the company dropdown is located in a different sheet).
I have adapted the code from here https://stackoverflow.com/questions/...ed-from-a-list, but cannot seem to get the dynamic element to work.
Here is the code I have used so far:
The problem seems to be the
part, where I get a run-time error '13' (type mismatch).
Any suggestions? Thanks
Bookmarks