ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Worksheet and workbook question (https://www.excelbanter.com/excel-worksheet-functions/198548-worksheet-workbook-question.html)

Amedea_C[_2_]

Worksheet and workbook question
 
Hello

I am looking for a piece of code that will do the following using VBA:

1. Transfer data from one worksheet to another worksheet within the same
workbook (for eg. "worksheet for May" is copied to a new worksheet, which
will be renamed "worksheet for June". Some data on this new worksheet will
remain the same, while some will be modified)
2. On this new worksheet, the data to be modified comes from different
workbooks. (for eg. there are atleast 5 instances where data is copied and
pasted from 5 different workbooks)

Kindly let me know if its possible?

Thanks


Gary Brown[_4_]

Worksheet and workbook question
 
This is an example of taking pieces of May thru August and pasting to
September.

Sheets("Wks for May").Select
Range("A3:A8").Select
Selection.Copy
Sheets("Wks for Sep").Select
Range("A3").Select
ActiveSheet.Paste
Sheets("Wks for Jun").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Wks for Sep").Select
Range("C3").Select
ActiveSheet.Paste
Sheets("Wks for Jul").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Wks for Sep").Select
Range("B7").Select
ActiveSheet.Paste
Sheets("Wks for Aug").Select
Range("E5:E10").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Wks for Sep").Select
Range("E5").Select
ActiveSheet.Paste

--
Hope this helps.
Thanks in advance for your feedback.
Gary Brown


"Amedea_C" wrote:

Hello

I am looking for a piece of code that will do the following using VBA:

1. Transfer data from one worksheet to another worksheet within the same
workbook (for eg. "worksheet for May" is copied to a new worksheet, which
will be renamed "worksheet for June". Some data on this new worksheet will
remain the same, while some will be modified)
2. On this new worksheet, the data to be modified comes from different
workbooks. (for eg. there are atleast 5 instances where data is copied and
pasted from 5 different workbooks)

Kindly let me know if its possible?

Thanks



All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com