PLEASE HELP!! Is this possible in VBA????

wrightyrx7

Well-known Member
Joined
Sep 15, 2011
Messages
994
Hi all,

I have a big report i run at the end of every month with about 25 columns, with upto 1000 rows, and was wondering if this is possible.

example columns:-

Name, Surname, NI number, Earnings, 1,A,2,B,3,C,4,D,5,E,etc

The colums above will be on the main worksheet.

Then what we do at the moment is create extra blank worksheets to then copy an paste the columns with all the data like this:-
Worksheet2 - Name, Surname, NI number, Earnings, 1,A
Worksheet3 - Name, Surname, NI number, Earnings, 2,B
Worksheet4 - Name, Surname, NI number, Earnings, 3,C
Worksheet5 - Name, Surname, NI number, Earnings, 4,D
Worksheet2 - Name, Surname, NI number, Earnings, 5,E

Is there anthing that can be created to automatically create the other worksheets from the main one?

Thanks in advance.

Chris
 
Last edited:
Yeah that is because of the offset that makes sure each row is pasted right below the last one.

if you paste this code between the end with and end sub lines it should take care of that problem

Code:
Worksheets(2).Range("A1").EntireRow.Delete
Worksheets(3).Range("A1").EntireRow.Delete
Worksheets(4).Range("A1").EntireRow.Delete
Worksheets(5).Range("A1").EntireRow.Delete
Worksheets(6).Range("A1").EntireRow.Delete
Worksheets(7).Range("A1").EntireRow.Delete
Worksheets(8).Range("A1").EntireRow.Delete
Worksheets(9).Range("A1").EntireRow.Delete
Worksheets(10).Range("A1").EntireRow.Delete
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
love it!!! THANK YOU SO SO SO MUCH. You just saved us so much work on a monthly basis!

All i have to do now is run the macro, the go onto each Worksheet add a new column with the totals of the last two columns.

:D very happy person!
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,254
Members
452,900
Latest member
LisaGo

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