VBA - Copy Range - New Sheet - Paste in new Sheet - Continue

Trent452

New Member
Joined
Jun 8, 2018
Messages
8
Hi All,

Hope everyone is well,

I require help with the following,

I have a sheet called data, which contains data exported from a piece of equipment.
I would like to breakdown this sheet into multiple sheets.

I require to create a copy of sheet '1', copy A15;E46 from 'Data', paste this into cell B15 of the new worksheet
then create a new copy of "sheet1", move to end of the workbook, go back to "Data" copy (the next 32) A47;E78, and paste this into B15 of the new worksheet
repeat this process until the last cell with value in "Data". So in the end I will have multiple sheets, each displaying 32 results from the "Data" sheet.

Link to a completed sheet

Thanks to everyone in advance.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about
Code:
Sub Trent452()
   Dim i As Long, j As Long
   Dim Ws As Worksheet
   
   Set Ws = Sheets("Data")
   For i = 15 To Ws.Range("A" & Rows.Count).End(xlUp).Row Step 32
      j = j + 1
      Sheets.Add(, Sheets(Sheets.Count)).Name = j
      Ws.Range("A" & i).Resize(32, 5).Copy Range("B15")
   Next i
End Sub
 
Upvote 0
Thanks, it works, however it does not make a copy of sheet "1". This sheet will have the the table and letterhead that the values shall be pasted into.
 
Upvote 0
What is the actual name of the sheet you want to copy & what should it be renamed too?
 
Upvote 0
Sorry for not explaining it well enough, your code worked perfectly. I just changed it for the sheet as follows:

Code:
Sub Trent452()
   Dim i As Long, j As Long
   Dim Ws As Worksheet
   
   Set Ws = Sheets("Data")
   For i = 15 To Ws.Range("A" & Rows.Count).End(xlUp).Row Step 32
      j = j + 1
      Sheets("1").Select
      Sheets("1").Copy After:=Sheets(Sheets.Count)
      Ws.Range("A" & i).Resize(32, 5).Copy Range("B17")
   Next i
End Sub

Really appreciate the help.
 
Upvote 0
Glad you sorted it & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top