精品丰满熟女一区二区三区_五月天亚洲欧美综合网_亚洲青青青在线观看_国产一区二区精选

  • <menu id="29e66"></menu>

    <bdo id="29e66"><mark id="29e66"><legend id="29e66"></legend></mark></bdo>

  • <pre id="29e66"><tt id="29e66"><rt id="29e66"></rt></tt></pre>

      <label id="29e66"></label><address id="29e66"><mark id="29e66"><strike id="29e66"></strike></mark></address>
      學習啦 > 學習電腦 > 工具軟件 > 辦公軟件學習 > Excel教程 > Excel2013教程 > 在excel2013中怎么把幾個excel合并到一個

      在excel2013中怎么把幾個excel合并到一個

      時間: 張偉670 分享

      在excel2013中怎么把幾個excel合并到一個

        我們?nèi)粘.a(chǎn)生的Excel數(shù)據(jù),有時候會保存在不同的Excel文檔里,等到要分析、整理數(shù)據(jù)的時候需要把每個文檔的數(shù)據(jù)復制、黏貼到一個Excel文檔里,再進行分析。這個時候文檔數(shù)據(jù)一多,工作量就大了。下面小編就教你在excel2013中怎么把幾個excel合并到一個的方法。

        把幾個excel合并到一個的步驟

        把需要合并的excel表格文檔放到同一個文件夾里


      把幾個excel合并到一個的步驟圖1

        新建一個“數(shù)據(jù)合并.xlsx“文檔


      把幾個excel合并到一個的步驟圖2

        打開“數(shù)據(jù)合并.xlsx“文檔,在”Sheet1“工作表的地方右鍵→查看代碼(快捷鍵:“Alt+F11”,盡量選用快捷方式)進入到Microsoft Visual Basic for Applications窗口


      把幾個excel合并到一個的步驟圖3

      把幾個excel合并到一個的步驟圖4

        雙擊工程資源管理器里面的sheet1,在右側(cè)的代碼區(qū)粘貼如下代碼:

        Sub 合并當前目錄下所有工作簿的全部工作表()

        Dim MyPath, MyName, AWbName

        Dim Wb As Workbook, WbN As String

        Dim G As Long

        Dim Num As Long

        Dim BOX As String

        Application.ScreenUpdating = False

        MyPath = ActiveWorkbook.Path

        MyName = Dir(MyPath & "\" & "*.xls")

        AWbName = ActiveWorkbook.Name

        Num = 0

        Do While MyName <> ""

        If MyName <> AWbName Then

        Set Wb = Workbooks.Open(MyPath & "\" & MyName)

        Num = Num + 1

        With Workbooks(1).ActiveSheet

        .Cells(.Range("A65536").End(xlUp).Row + 2, 1) = Left(MyName, Len(MyName) - 4)

        For G = 1 To Sheets.Count

        Wb.Sheets(G).UsedRange.Copy .Cells(.Range("A65536").End(xlUp).Row + 1, 1)

        Next

        WbN = WbN & Chr(13) & Wb.Name

        Wb.Close False

        End With

        End If

        MyName = Dir

        Loop

        Range("A1").Select

        Application.ScreenUpdating = True

        MsgBox "共合并了" & Num & "個工作薄下的全部工作表。如下:" & Chr(13) & WbN, vbInformation, "提示"

        End Sub


      把幾個excel合并到一個的步驟圖5

      把幾個excel合并到一個的步驟圖6

        運行→運行子過程/用戶窗體(或者直接點擊運行按鈕,快捷鍵:F5),即可合并所有Excel表格到”數(shù)據(jù)合并.xlsx“文檔的Sheet1工作表里面


      把幾個excel合并到一個的步驟圖7

        完成Excel表格的合并


      把幾個excel合并到一個的步驟圖8

      猜你喜歡:

      1.在excel2013中怎么把幾個excel合并到一個

      2.excel2013多個excel表格如何合并

      3.如何把excel兩列合并的教程

      4.excel怎么給多個工作表同時錄入相同的數(shù)據(jù)

      5.excel2013怎么對多個數(shù)據(jù)進行匯總

      6.如何合并幾個excel的教程

      402062