This code needs to be modified, but works pretty well for excel spreadsheets.
Some people have had problems with the FileSearch function. Put all you
files in one directory and change Lookin directory. and Filetype (to text).
The .COPY statement will also need tto be modified.
Sub GetData()
Set fs = Workbooks.Application.FileSearch
With fs
.LookIn = "c:\Temp"
.FileType = msoFileTypeExcelWorkbooks
.Execute
End With
For i = 1 To fs.FoundFiles.Count
MyfileName = fs.FoundFiles(i)
Workbooks.Open Filename:=MyfileName, ReadOnly:=True
' Removed pathname from file name so it can be referenced in this
program.
'Basic doesn't like the full pathname???? stupid microsoft
Do While (1)
CharPosition = InStr(MyfileName, "\")
If CharPosition > 0 Then
MyfileName = Mid(MyfileName, CharPosition + 1)
Else
Exit Do
End If
Loop
Workbooks(MyfileName).Worksheets("Sheet1").Range("B22

24").Copy _
Destination:=Workbooks(ThisWorkbook.Name).Worksheets("Sheet1"). _
Range("A10").Offset(rowOffset:=0, columnOffset:=0)
Workbooks(MyfileName).Close SaveChanges:=False
Next i
End Sub