วันพฤหัสบดี, มีนาคม 24, 2554

ปุจฉา: excel ต้องการนำข้อมูลจากคอลัมภ์ ของหลายๆๆ ชีต มาเรียงต่อกัน ทำไง

วิสัชนา: Merge cells from all or some worksheets into one Master sheet

Ron de Bruin (last update 22-Nov-2008)
Go back to the Excel tips page
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

3 ความคิดเห็น:

` aay .. กล่าวว่า...

แหม

明 เม้ง  ^__^ กล่าวว่า...

หาง่ายใช้คล่อง

` aay .. กล่าวว่า...

ขอบคุณคร๊าบบบบบบบบบบ