HELP - Copying data from one sheet in one workbook into another in workbook

shadows200354

New Member
Joined
Feb 16, 2016
Messages
11
Hi,

I am quite new to the forums and also to macro/vba coding.

I need a code that will copy data from one workbook's workheet to another workbook.

Specifically I have data on different tabs/sheets which relate to individual clients, in workbook A, I want to be able to copy data a tab from Column C to P into a new workbook everytime i click a button. this needs to be replicated on most other tabs. The different tabs dont need to go into the same sheet either. The orignal sheet is rolled over and the name is changed every month.

Sinario
for In Jan's file I want to into it, press a button and then from Tab1 it will copy the data into a new workbook based on Column C to P and paste into the new workbook and it paste special values and pasted formatting.

Can this be achieved?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi Shadows,

Yes it seems to be possible but you need to show your data layout as well.
Or, you can break down your questions in small parts and ask one part at a time (in steps). Thanks


Regards,
DILIPandey
 
Upvote 0
Hi DiliPandey,
Thanks for the reply.

Column c to p contains data on invoice with vat amount and net amounts; invoice narratives and dates also invoice numbers and clients thats the data in columns c to p.

I would have thought the content of the columns would have been irelevant. Its a copy n paste values to the new spreadsheet.
 
Upvote 0
Okay.. try below code:-

Code:
Sub copypaste()
Range("C:P").Copy
Workbooks.Add
ActiveCell.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
End Sub


Regards,
DILIPandey
 
Upvote 0
Thank you very much for this code, it works like a treat, can I just confirm (I know very little about VBA) this code pastes formats as well.

sorry for the late response - been busing doing the accounts.

thank you very much!!! i really appreciate this help.
 
Upvote 0
This code pastes "Values and Number formats".

It is there in paste special window -> 4th one right side.


Regards,
DILIPandey
 
Upvote 0

Forum statistics

Threads
1,216,434
Messages
6,130,611
Members
449,584
Latest member
c_clark

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