TheNewExcelGuy
New Member
- Joined
- Jun 13, 2022
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
- MacOS
Hello everyone!
I'm looking for some help on how to go about making a code to Loop a file with 3 tabs and then copy, paste, and save another spreadsheet with the data. To be more specific I'm trying to do the 4 things below.
I'm looking for some help on how to go about making a code to Loop a file with 3 tabs and then copy, paste, and save another spreadsheet with the data. To be more specific I'm trying to do the 4 things below.
- I would like to have the code in an excel (called "Data") that will always have 3 tabs
- Company
- Contributions
- Employees
- I'm hoping the code can loop the list in the "Company" tab and for each row do the following:
- Open a Template called "Quote"
- Paste the value in column Data.Company.A1 to Quote.Sheet5.C13
- Paste the value in column Data.Company.B1 to Quote.Sheet5.C14
- Then move to the list in the "Contributions" tab and for the same company (something like Data.Company.B1 = Data.Contributions.A), do the following:
- Copy Contributions.C2:C6 to Quote.Sheet7.I22:I26
- And last, move to the list in the "Employees" tab and for the same company (something like Data.Company.B1 = Data.Employees.A), do the following:
- Copy all rows that match that company from Employees.C:M and paste it to Quote.Sheet5.A21:A
- Save the file as The value in Sheet5.C14 + Sheet5.C13 + the word Quote