Sub LayDL_HLMT()
Dim strField, strSQL As String
Dim i As Integer
For i = 1 To 11
strField = strField & "," & "F" & i
Next
strField = Right(strField, Len(strField) - 1)
For i = 1 To 26
strSQL = strSQL & " union all select " & strField & ", (Select F1 from [" & i & "$B7:I7]), (Select F8 from [" & i & "$B7:I7]) from [" & i & "$a18:k] where F5 is not null and F7>0"
Next
With CreateObject("ADODB.Connection")
.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ThisWorkbook.FullName & ";Extended Properties=""Excel 12.0;HDR=No;IMEX=1"";"
Sheet14.Range("a3").CopyFromRecordset .Execute(Right(strSQL, Len(strSQL) - 10))
End With
End Sub