4
I have a set of worksheets (for example, suppose they are called file01.xls, file02.xls, file03.xls etc.), all with the same columns in the Sheet1 tab and with the other empty tabs. How do I join these sheets into one without having to open, copy and paste one by one?
An example for better illustration. Suppose file01.xls contains:
|    |   A    |      B       |
|----|--------|--------------|
| 1  | NOME   | RG           |
| 2  | João   | 12.345.678-9 |
| 3  | José   | 11.111.111-1 |
| 4  | Maria  | 12.121.212-1 |
file02.xls contains:
|    |    A    |       B       |
|----|---------|---------------|
| 1  | NOME    | RG            |
| 2  | Luís    | 55.555.555-5  |
| 3  | Carlos  | 98.765.432-1  |
| 4  | Ana     | 22.333.444-5  |
and which file03.xls contains:
|    |    A    |       B        |
|----|---------|----------------|
| 1  | NOME    | RG             |
| 2  | Marcos  | 12.321.234-3   |
| 3  | Edna    | 98.765.678-9   |
| 4  | Ida     | 99.888.777-6   |
What I want to get is a file_aggregated.xls that contains:
|     |    A    |       B        |
|-----|---------|----------------|
|  1  | NOME    | RG             |
|  2  | João    | 12.345.678-9   |
|  3  | José    | 11.111.111-1   |
|  4  | Maria   | 12.121.212-1   |
|  5  | Luís    | 55.555.555-5   |
|  6  | Carlos  | 98.765.432-1   |
|  7  | Ana     | 22.333.444-5   |
|  8  | Marcos  | 12.321.234-3   |
|  9  | Edna    | 98.765.678-9   |
| 10  | Ida     | 99.888.777-6   |
You easily have this supplement here https://www.ablebits.com/excel-addins.php. Or you can use Power Query: https://support.office.com/en-us/article/Combine-data-from-multiple-data-sources-Power-Query-70cfe661-5a2a-4d9d-a4-a4-586cc78c7d
– Umo
@Marcelo this union is unique or is something you need to do daily.
– R.Galamba
Excel formula only or you also use VBA?
– danieltakeshi
R. Galamba, this is a union that I do monthly. I do it on the basis of copy and paste, but something that automates it would be welcome.
– Marcelo
danieltakeshi, I use VBA but something simpler would be preferable.
– Marcelo
In time: I use R and tried to make a program to automate this junction, but there appeared an error message that I have no idea what it means or how to fix.
– Marcelo