- 9
- 0
- 约7.2千字
- 约 13页
- 2017-10-06 发布于河南
- 举报
工作薄分解合并成工作表(The workbook decomposes and combines into worksheets)
工作薄分解合并成工作表(The workbook decomposes and combines into worksheets)
How does excel combine multiple worksheets in a workbook into a worksheet?
Open your workbook to a new worksheet in the sheet tab on the right to view the code you copy the following code to it, then there is a subroutine can run, code is as follows, if there is a problem, you can try tools macro macro security to the lower or low again try
Sub merges all worksheets under the current workbook ()
Application.ScreenUpdating = False
For J = 1, To, Sheets.Count
If Sheets (J) ActiveSheet.Name Then.Name
X = Range (A65536),.End (xlUp),.Row + 1
Sheets (J).UsedRange.Copy Cells (X, 1)
End If
Next
Range (B1).Select
Application.ScreenUpdating = True
MsgBox all worksheets under the current workbook have been merged! VbInformation, hint
End Sub
Break the worksheet into a workbook
1, open excel, press alt+F11 to enter the programming mode
2. Select the bottom ThisWorkbook of the list on the left
3, appear code box, copy the code closed.
Sub, SaveSheet ()
For, Each, WS, In, ThisWorkbook.Worksheets
Ws.Copy
ActiveWorkbook.SaveAs Filename:= _
ThisWorkbook.Path \ ws.Name, FileFormat:=xlNormal _
Password:=, WriteResPassword:=, ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Close
Next
End Sub
4. click on the running command of the status bar!
A plurality of thin work into a job execution module in using.
To build a macro in the macro code.
MyPath = ActiveWorkbook.Path
ActiveName = ActiveWorkbook.Name
MyName = Dir (MyPath \ *.xls)
I = 0
Do While MyName
If MyName ActiveName Then
Set Wb = Workbooks.Open (MyPath \ MyName]
I = I + 1
With Workbooks (1).ActiveSheet
For J = 1, To, Sheets.Count
Wb.Sheets (J),.Copy, Before:=Workbooks (ActiveName),.Sheets (1)
Next
Wbn = Wbn Chr (13) Wb.Name
Wb.Close False
End With
End If
MyName = Dir
Loop
MsgBox merged together I Workbook, as follows: Chr (13) Wbn, Workbook merge
In one step, the worksheet in several industrial thin sheets is merged into a worksheet in a
您可能关注的文档
- 安全教育班会教案 小学低年级 - 教学计划总结 - 免费教育文稿网(Safety education class meeting, lesson plan, junior grade - teaching plan summary - free education manuscript network).doc
- 安徽药采试验隐忧(Anhui drug production test worries).doc
- 安房直子不可思议的文具店(An apartment, an incredible stationery store).doc
- 安徽高校大学分析(Analysis of universities in Anhui).doc
- 宁夏红雄起之路(Ningxia red on the road).doc
- 安庆一中2007届高三二模考试理科综合物理试卷(One of the 2007 session of the Anqing high school science comprehensive physical examination paper the second mock exam exam).doc
- 安装好sqlserver2000安装失败提示安装程序配置服务器失败(Installed sqlserver2000 installation failed. Prompt setup configuration server failed).doc
- 宋亮-一个世纪的守望(Song Ming - a century of watch).doc
- 宋代私学的特性及其社会教化功能(The characteristics of private school and its social civilizing function in Song Dynasty).doc
- 宋代耀州窑系瓷器纹饰(The porcelain decoration of Yaozhou kiln in Song Dynasty).doc
- 小区绿化施工协议书.docx
- 墙面施工协议书.docx
- 1 古诗二首(课件)--2025-2026学年统编版语文二年级下册.pptx
- (2026春新版)部编版八年级道德与法治下册《3.1《公民基本权利》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《4.3《依法履行义务》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《6.2《按劳分配为主体、多种分配方式并存》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《6.1《公有制为主体、多种所有制经济共同发展》PPT课件.pptx
- 初三教学管理交流发言稿.docx
- 小学生课外阅读总结.docx
- 餐饮门店夜经济运营的社会责任报告(夜间贡献)撰写流程试题库及答案.doc
原创力文档

文档评论(0)