Question is like this, in the same sheet in multiple forms,
Header field names, but the order header field is not the same, how to collect
Image is, for example, hope by the header of the first picture collect into a sheet, and add a list of summary of each table name in the first column
CodePudding user response:
You where the "header"!!!!!!!!!!God knows you this table which column corresponding to that which column of the table...
CodePudding user response:
Oh, the original is "line 1" header, not to notice first,But your figure 2, Japan's "B" is different from the summary;
Figure 3, is still a "B" - Japan and the United States of data exchange, it is "a slip of the pen"?
Data contrast is too difficult, other have no problem, don't say...
CodePudding user response:
Image data is used for example, literally fillCodePudding user response:
What a great god help below the answer ~ ~CodePudding user response:
'you can put your hair of the case name for "2021" the name of the worksheet to standard table, run this code try'can't upload attachments too much trouble
Screening (Sub)
Dim the ws As Worksheet, rng1 As Range, RNG As Range, a %
The Set RNG=Sheets (" standard table "). The Range (" a1 ", [a1]. End (xlToRight))
For Each ws Worksheets In
If the ws. The Name & lt;> "Standard table" Then
Ws. Activate
For Each rng1 RNG In
A=ws. Range (" 1 "). The Find (rng1). The Column
Ws. Range (Cells (2 a), Cells (Rows) Count, a). The End (xlUp). Copy Sheets (" standard table ") Cells (Rows. The Count, rng1. The Column). The End (xlUp) (2, 1)
Next
End the If
RNG. Copy Sheets (" standard table ") Cells (Rows. The Count, "a".) the End (xlUp) (2, 1)
Next
Sheets (" standard table "). Activate
End Sub
CodePudding user response:
Will you Excel Sheet as a Jet Engine external database table, use the SQL query to query, the database Engine is don't care about the order of fields,