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

  • <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>
      學(xué)習(xí)啦>學(xué)習(xí)電腦>工具軟件>辦公軟件學(xué)習(xí)>Excel教程>Excel基礎(chǔ)>

      excel怎么合并多個工作表

      時間: 嘉銘873 分享

        EXCEL軟件里有很多個工作表,每個工作表形成獨立的數(shù)據(jù)內(nèi)容,如果想要把多個表的數(shù)據(jù)合并到一個工作表中,該如何進行呢?下面就跟學(xué)習(xí)啦小編一起來看看吧。

        excel合并多個工作表的步驟

        打開EXCEL表格,為了舉例,分別在兩個表格中輸入不同的數(shù)據(jù)。

        按住ALT鍵不放,再按F11鍵,打開VBE編輯器。

        03右鍵點擊工程窗口下的Microsoft Excel對象,再指向插入。

        插入一欄的旁邊出現(xiàn)了列表,點擊模塊。

        出現(xiàn)了模塊的界面。

        輸入以下代碼:

        Option Explicit

        Sub hbgzb()

        Dim sh As Worksheet, flag As Boolean, i As Integer, hrow As Integer, hrowc As Integer

        flag = False

        For i = 1 To Sheets.Count

        If Sheets(i).Name = "合并數(shù)據(jù)" Then flag = True

        Next

        If flag = False Then

        Set sh = Worksheets.Add

        sh.Name = "合并數(shù)據(jù)"

        Sheets("合并數(shù)據(jù)").Move after:=Sheets(Sheets.Count)

        End If

        For i = 1 To Sheets.Count

        If Sheets(i).Name <> "合并數(shù)據(jù)" Then

        hrow = Sheets("合并數(shù)據(jù)").UsedRange.Row

        hrowc = Sheets("合并數(shù)據(jù)").UsedRange.Rows.Count

        If hrowc = 1 Then

        Sheets(i).UsedRange.Copy Sheets("合并數(shù)據(jù)").Cells(hrow, 1).End(xlUp)

        Else

        Sheets(i).UsedRange.Copy Sheets("合并數(shù)據(jù)").Cells(hrow + hrowc - 1, 1).Offset(1, 0)

        End If

        End If

        Next i

        End Sub

        退回到工作表界面,按住ALT鍵不放,再按F8鍵,打開宏對話框,點擊執(zhí)行hbgzb宏。

        工作表合并完成。


      excel合并多個工作表的相關(guān)文章

      1.如何合并單個excel表中的多個工作表

      2.excel多個表格合并成一個工作表的方法

      3.如何快速把多個excel表合并成一個excel表

      1770853