I have found a large part of my solution from this thread:
FROM HERE
Basically, I want to search all the files in a specific folder and put different cells into a new line on a master excel. I have attached a picture so you can see what I mean more clearly.
I have taken the macro from the above thread and modified to suit my needs. Now I just need to change a few things.
Here is the code:
Sub List()
Dim z As Long, e As Long
Dim f As String
Cells(1, 1) = "=cell(""filename"")"
Cells(1, 2) = "=left(A1,find(""["",A1)-1)"
e = 2
Cells(2, 1).Select
f = Dir(Cells(1, 2) & "*.xls")
Do While Len(f) > 0
ActiveCell.Formula = f
ActiveCell.Offset(1, 0).Select
f = Dir()
Loop
z = Cells(Rows.Count, 1).End(xlUp).Row
For e = 2 To z
MsgBox Cells(e, 1)
Cells(1, 3) = "='" & Cells(1, 2) & "[" & Cells(e, 1) & "]Sheet1'!E76"
Cells(e, 2) = Cells(1, 3)
Next e
MsgBox "collating is complete."
End Sub
So this macro takes all the files in the folder it is in and puts the information in cell E76 to Column B.
I want to to extend this macro a bit more and take the information from K40 to COLUMN A, G40 to Column B, E51 to Column C and so on for about 20 different cells.
Also, I want them to start from ROW2 on, so that I can have titles at the top (if possible)
Can I also get rid of the printing of the filenames in Column A ?
Thank you so much for all your help and advice.
Bookmarks