Alright so I continue on my little project and I need some additional help. I've asked a lot from the community, so I feel that I should reward the person that helps me figure this out.
I have this table of information that I'm trying to export to another tab that has this standard template that I need the respective information from each row of the table to fill this template.
What I want to do is create a macro when run will copy the data from the table to this standard template (think of it as the letter merge you can do with Word/Excel, but all within Excel now). Heres the first part of the code that I used to ask how many templates that I need to make.
x = InputBox("How many copies of TOE do you need??")
For numtimes = 1 To x
'Loop by using x as the index number to make x number copies.
ActiveWorkbook.Sheets("Blank").Copy _
After:=ActiveWorkbook.Sheets("Blank")
Heres a copy of the table that I have
As you can see the information that I need to take are not in one straight row to make things super easy (they are marked in "X"), but they repeat every 4 rows.
So I think I have a bit of a start of the code that I need to add to the original macro so that it imports the data from this table to the standard template but could use some help because I know its not 100% correct because when i try to run it, it doesn't work. I think my largest issue will be how I select the sheets to paste this information.
Dim x As Integer
x = InputBox("How many copies of TOE do you need??")
For numtimes = 1 To x
'Loop by using x as the index number to make x number copies.
ActiveWorkbook.Sheets("Blank").Copy _
After:=ActiveWorkbook.Sheets("Blank")
Sheets("APG").Select
Range("B", "(7+4*X)").Select
Selection.Copy
Sheets("Blank", "(1+X)").Select
Range("B", "(7+4*X)").Select
ActiveSheet.Paste
Next
the 4 is used because its every 4th row.
Thank you in advance for helping a newbie
I have this table of information that I'm trying to export to another tab that has this standard template that I need the respective information from each row of the table to fill this template.
What I want to do is create a macro when run will copy the data from the table to this standard template (think of it as the letter merge you can do with Word/Excel, but all within Excel now). Heres the first part of the code that I used to ask how many templates that I need to make.
x = InputBox("How many copies of TOE do you need??")
For numtimes = 1 To x
'Loop by using x as the index number to make x number copies.
ActiveWorkbook.Sheets("Blank").Copy _
After:=ActiveWorkbook.Sheets("Blank")
Heres a copy of the table that I have
As you can see the information that I need to take are not in one straight row to make things super easy (they are marked in "X"), but they repeat every 4 rows.
So I think I have a bit of a start of the code that I need to add to the original macro so that it imports the data from this table to the standard template but could use some help because I know its not 100% correct because when i try to run it, it doesn't work. I think my largest issue will be how I select the sheets to paste this information.
Dim x As Integer
x = InputBox("How many copies of TOE do you need??")
For numtimes = 1 To x
'Loop by using x as the index number to make x number copies.
ActiveWorkbook.Sheets("Blank").Copy _
After:=ActiveWorkbook.Sheets("Blank")
Sheets("APG").Select
Range("B", "(7+4*X)").Select
Selection.Copy
Sheets("Blank", "(1+X)").Select
Range("B", "(7+4*X)").Select
ActiveSheet.Paste
Next
the 4 is used because its every 4th row.
Thank you in advance for helping a newbie
Last edited: