gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
This is a pretty big request and I appreciate the help.
I am looking for VBA code that will
first ask the user to open the workbook where the data is going to be copied to.
Check the opened workbook to ensure it has a tab named "Data"
In the workbook that is being opened the Column Names are in Row 1. (This workbook is not set up as a table.)
In the users Original workbook they will have a tab named "LineCharges" in this tab there is a table named: MSQ_BySE_LineCharges The tables columns names are in Row 5.
If possible I need to go through each column and check to see if it finds a column name match between the original workbook and the one they opened.
If there is an exact name match to the columns I need to copy the table column and paste it into the matching column of the opened workbook starting in row 7
The table can have anywhere between 40-60 columns and sometimes the source where its pasting to may or may not have the same columns and the columns may be in a different order. Something I cant control. This is what makes it a bit to difficult for me to code.
Any help is very much appreciated and I truly appreciate your time.
I am looking for VBA code that will
first ask the user to open the workbook where the data is going to be copied to.
Check the opened workbook to ensure it has a tab named "Data"
In the workbook that is being opened the Column Names are in Row 1. (This workbook is not set up as a table.)
In the users Original workbook they will have a tab named "LineCharges" in this tab there is a table named: MSQ_BySE_LineCharges The tables columns names are in Row 5.
If possible I need to go through each column and check to see if it finds a column name match between the original workbook and the one they opened.
If there is an exact name match to the columns I need to copy the table column and paste it into the matching column of the opened workbook starting in row 7
The table can have anywhere between 40-60 columns and sometimes the source where its pasting to may or may not have the same columns and the columns may be in a different order. Something I cant control. This is what makes it a bit to difficult for me to code.
Any help is very much appreciated and I truly appreciate your time.