How to merge multiple excel tables into one table
Quickly merge excel together to facilitate analysis and statistics, which can be achieved by using the macro calculation of the excel table. The method is as follows:
1. We need to put multiple excel tables in the same folder and create a new excel in this folder. As shown in the picture:
#2. Use Microsoft Excel to open the newly created excel sheet, right-click sheet1, find "View Code", and click in. After entering, you will see the macro calculation interface. As shown in the picture:
3. Then we copy the following macro calculation codes, and then find the "Run Subprocess/" under "Run" on the toolbar. User Form", the code is as follows, as shown in the figure:
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("B65536").End(xlUp).Row + 2, 1) = Left(MyName, Len(MyName) - 4) For G = 1 To Sheets.Count Wb.Sheets(G).UsedRange.Copy .Cells(.Range("B65536").End(xlUp).Row + 1, 1) Next WbN = WbN & Chr(13) & Wb.Name Wb.Close False End With End If MyName = Dir Loop Range("B1").Select Application.ScreenUpdating = True MsgBox "共合并了" & Num & "个工作薄下的全部工作表。如下:" & Chr(13) & WbN, vbInformation, "提示" End Sub
4. After running, wait for about 10 seconds. When the running is completed, that is, after the merger is completed, there will be Tip, just click OK.
#5. Check the merged data. There are more than 5,000 rows, which is the result of merging data from 17 excel tables in the same folder. The effect is shown in the figure.
Recommended related articles:
1.How to merge multiple sheets into one in excel
2.How to merge table contents?
For more Excel-related technical articles, please visit the Excel Tutorial column to learn!
The above is the detailed content of How to merge multiple excel tables into one table. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Taking two arrays as input, try to merge or concatenate the two arrays and store the result in the third array. The logic of merging two arrays is as follows-J=0,k=0for(i=0;i<o;i++){//mergingtwoarrays if(a[j]<=b[k]){ c[i] =a[j]; j++; }else{ &nbs

It is not recommended to merge 2.4g and 5g; because dual-band integration has advantages and disadvantages, it may be difficult for some mobile phones to connect to dual-band WiFi; for general wireless routers, if there is no weak signal rejection function, then the mobile phone after dual-band integration is enabled It may be always connected to the 2.4G frequency band and will not switch to the faster 2.4G frequency band at all unless you manually turn on and off WIFI, so it is recommended to set it up separately.

Overview of advanced functions of how to use HTML, CSS and jQuery to implement image merge display: In web design, image display is an important link, and image merge display is one of the common techniques to improve page loading speed and enhance user experience. This article will introduce how to use HTML, CSS and jQuery to implement advanced functions of image merging and display, and provide specific code examples. 1. HTML layout: First, we need to create a container in HTML to display the merged images. You can use di

In Java development, we often need to combine multiple input streams to process data. The SequenceInputStream function is one of the functions provided in Java for merging input streams. It can merge multiple input streams into a larger input stream to facilitate our data processing. So, how to use the SequenceInputStream function in Java to merge input streams? Next, this article will introduce its specific implementation methods and precautions through detailed steps. I

CSV (Comma Separated Values) files are widely used to store and exchange data in a simple format. In many data processing tasks, there is a need to merge two or more CSV files based on specific columns. Fortunately, this can be easily achieved using the Pandas library in Python. In this article, we will learn how to merge two CSV files by specific columns using Pandas in Python. What is the Pandas library? Pandas is an open source library for information control and inspection in Python. It provides tools for working with structured data (such as tabular, time series, and multidimensional data) and high-performance data structures. Pandas is widely used in finance, data science, machine learning, and other fields that require data manipulation.

Get started quickly: JSON array merging and splitting techniques in Java In modern software development, data format and transmission have become increasingly important. Among them, JSON (JavaScriptObjectNotation) is a commonly used data format, especially suitable for front-end and back-end interaction and data storage. In Java development, we often need to deal with JSON objects and JSON arrays. This article explains how to merge and split JSON arrays in Java, along with tips and examples for implementing these operations.

How to use PHPZipArchive to merge and split multiple compressed packages? Overview: During the development process, sometimes we need to merge multiple compressed packages into one, or split a compressed package into multiple ones. PHP provides the ZipArchive extension to easily complete these operations. This article will introduce how to use PHPZipArchive to merge and split multiple compressed packages. Merging multiple archives First, we need to create a new archive and open it. Then, the loop traversal needs to be

WPSOffice is an office software suite that can realize the most commonly used text, tables, presentations and other functions of office software. It has the advantages of low memory usage, fast running speed, compact size, and powerful plug-in platform support. It brings great benefits to the office. There are many conveniences, so how to merge cells when using WPS tables? Here I have 2 ways to help you! Share a detailed tutorial on how to merge cells in WPSExcel. I hope this tutorial will be helpful to everyone. If there are students who need it, remember to bookmark this tutorial! Method 1: First, you need to download and install WPSOffice on your computer, then open the WPS form and create a new blank form workbook. 2. Hold down the left mouse button and drag the
