Code:
Sub getResult()
Dim ary1 As Variant
Dim wfile As String, wdiag As Long, wpath As String, wbook As String
Dim i As Integer
Dim wb As Workbook
Dim awb As Workbook
Dim aws As Worksheet
Set awb = ThisWorkbook
Set aws = ActiveSheet
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = True
.Filters.Clear
.Filters.Add "Excel Files", "*.xls*"
If .Show = True Then
For i = 1 To .SelectedItems.Count
Workbooks.Open .SelectedItems(i)
Next i
End If
End With
For Each wb In Application.Workbooks
If wb.Name <> "PERSONAL.xlsb" And wb.Name <> awb.Name Then
wb.Worksheets(1).Range("A1") = Date
ary1 = wb.Worksheets(1).Range("A1").CurrentRegion.Value2
wb.Close False
End If
Next wb
aws.Range("A1").Resize(UBound(ary1), UBound(ary1, 2)).Value = ary1
End Sub
i don't know how to multi select everything in a folder, but this will allow you to highlight everything in a folder
some notes:
1. you must save whatever file this macro is as an xlsm
2. it must be run as the only open workbook
3. it will only show "xls" files you can change that as needed on the
.Filters.Add "Excel Files", "*.xls*" line
let me know if that works for you