วิสัชนา: Merge cells from all or some worksheets into one Master sheet
The examples will add a worksheet with the name RDBMergeSheet to your workbook and will copy cells
from every worksheet in the ActiveWorkbook to this worksheet. Each time you run one of the examples it
will first delete the summary worksheet named RDBMergeSheet if it exists and then adds a new one to
the workbook. This ensures that the data is always up to date after you run the code.
In the examples I use a values/formats copy but below the first example there is example code to copy
only the values or everything to the RDBMergeSheet.
Important:
The macro examples use the LastRow or LastCol function that you can find in the last section of this page.
Copy the macro(s) and function(s) in a standard module of your workbook.
If you have no idea where to paste the code then check out this page.
http://www.rondebruin.nl/code.htm
Example workbook
Download a zip file with a workbook with the code from this page to test the examples.
Download MergeWorksheetsCode.zip
from every worksheet in the ActiveWorkbook to this worksheet. Each time you run one of the examples it
will first delete the summary worksheet named RDBMergeSheet if it exists and then adds a new one to
the workbook. This ensures that the data is always up to date after you run the code.
In the examples I use a values/formats copy but below the first example there is example code to copy
only the values or everything to the RDBMergeSheet.
Important:
The macro examples use the LastRow or LastCol function that you can find in the last section of this page.
Copy the macro(s) and function(s) in a standard module of your workbook.
If you have no idea where to paste the code then check out this page.
http://www.rondebruin.nl/code.htm
Example workbook
Download a zip file with a workbook with the code from this page to test the examples.
Download MergeWorksheetsCode.zip
Attachment: MergeWorksheetsCode.xls
3 ความคิดเห็น:
แหม
หาง่ายใช้คล่อง
ขอบคุณคร๊าบบบบบบบบบบ
แสดงความคิดเห็น