Hello friends, hope all is well!
The below code uses a SQL code to combinemulti sheets (workbooks) into 1.
because there are many rows it is expected totake time, that is OK. The process is done. Now, I want to add on a differentdate a new sheet,
let ussay F:\DATABASES\AvgClaimCo\14.xlsb`.[JAN-APR$]
Can somebody please help, and tell me how canI add the above sheet to the existing already added sheets from a previousperiod.
instead of redoing the UNION ALL All overagain of 2015,2016,2017,2018?
This will save loads of time, and effort.Thanks a lot in advance!
SELECT [HEAD$].* FROM [HEAD$]
UNION ALL
SELECT * FROM`F:\DATABASES\AvgClaimCo\17-18.xlsb`.[JAN-APR$]
UNION ALL
SELECT * FROM`F:\DATABASES\AvgClaimCo\17-18.xlsb`.[MAY-AUG$]
UNION ALL
SELECT * FROM`F:\DATABASES\AvgClaimCo\17-18.xlsb`.[SEP-DEC$]
UNION ALL
SELECT * FROM`F:\DATABASES\AvgClaimCo\16.xlsb`.[JAN-MAR$]
UNION ALL
SELECT * FROM`F:\DATABASES\AvgClaimCo\16.xlsb`.[APR-SEP$]
UNION ALL
SELECT * FROM`F:\DATABASES\AvgClaimCo\16.xlsb`.[OCT-DEC$]
UNION ALL
SELECT * FROM`F:\DATABASES\AvgClaimCo\15.xlsb`.[Jan-Mar$]
UNION ALL
SELECT * FROM`F:\DATABASES\AvgClaimCo\15.xlsb`.[Apr-Jun$]
UNION ALL
SELECT * FROM `F:\DATABASES\AvgClaimCo\15.xlsb`.[Jul-Sep$]
UNION ALL
SELECT * FROM`F:\DATABASES\AvgClaimCo\15.xlsb`.[Oct-Dec$]