Hello,
Please see the attached two documents, one is a template and the other is a master. They are both simply an example with generic data and headers. I am trying to make a document ("Template") which contains a drop-down in a column, Header 6, in this example. When a product is selected from that drop-down, I would like all of the information in the Template document to be auto-populated into the correct columns with the data found in the Master document.
The Master document has various tabs for each process as you can see. In the real document, I made this example for privacy purposes, the headers are not named numerically as so. Also, the document is very fluid, so columns will be added and deleted a lot. Therefore, the auto-population has to be able to find the correctly named header and insert the data based on the selected product from the drop-down.
Please see the attached Master and Template examples for more clarification.
What do you guys think is the best way to tackle this?
Currently, I have started by using a change event sub. I have started using a find function to locate the column in both the Template and Master document based on the header names, that way if the columns are moved around it will still find the correct column. There are over 100+ columns in the real document, so there are a lot of arguments in the function. Once I have the correct locations, I was thinking of putting all of the master information and locations into an array, and all of the template locations into another array, then using both arrays to place the information in the template.
Any better ways? The way I'm doing it seems very long and tedious.
Bookmarks