I have a majority of several worksheets even having header
but one (1) spreadsheet has a different header
I have this code that will combine them all
Under handset () Dim xWs As Worksheet In case of error, next recovery Set xWs = ActiveWorkbook.Worksheets.Add (Sheets (1)) xWs.name = "Combined" Sheets (2) .Range ("A1"). Destination EntireRow.Copy: = xWs.Range ("A1") For i = 2 TB Worksheets.Count Worksheets (i). Range ("A1"). CurrentRegion.Offset (1, 0) .Copy _ Destination: = xWs.Cells (xWs.UsedRange.Cells (xWs.UsedRange.Count) .Row + 1, 1) following Dim s As Worksheet, t As String Dim j as long, k as long K = Sheets.Account For j = K To 1 Step -1 t = Leaves (j) .name If t <> "Combined" then Application.DisplayAlerts = False Leaves (j) .Delete Application.DisplayAlerts = True End if Next j
it works well but I want my 1 sheet to be inserted in column D until its last column
sheet3 does not contain the first 3 columns of the other sheet
sheet1, sheet2 and sheet 4 contain these columns
Branch | Population | Store | name | age | ...
while leaf3 contains
name | age | ...
the others are the same as the first 3 columns are not.
I do not do what I am going to add to the code to insert in the designated column.
oh they contain different data values