okay,
For myself, I actually ignore the Dim, ya shame on me.
you will want
Dim path, mm, ss, ff, cc1, cc2, ... , cc20 as String
Dim arg1, arg2, ... as Variant
then build the loop, and inside the loop all i need is the
cc1 = cells(6,7).address(, , xlR1C1)
cc2 = sheets("January").cells(etc. etc)
cc3 = where is the data coming from
path = you know
the arguments are easy to build you will want to keep them in teh format I specified earlier, if not, I'll adjust those as needed for you.
getvalue1 = executeexecelmacro4(arg1)
getvalue2 = ...
repeat for all instances
'master sheet data
cells( , ) = Getvalue1
show me where you need this information to go, or give me a general conceptualization, are we putting it in whatever blank row there is? specific spot so you can do calculations? etc etc.
so I just need you to show me the start and finish and i'll do the inbetween stuff.
Regards,
jc
Sub Retrieve()
Dim a As Integer
'
Path = "C:\Temp\" ' where your data is located
MM = "Data File" & "\" ' sub folder if any...
For a = 1 To 3000
arg1 = "" & Path & MM & "Master*" & "" ' construct path and file name
If Dir(arg1) = "" Then
GetValue = "File Not Found"
Exit Sub
End If
FF = Dir(arg1)
SS = "Summary'!" 'sheet the data is stored on
CC1 = Cells(a, 13).Address(, , xlR1C1) 'the cells we shall be working with (column M)
CC2 = Cells(a, 37).Address(, , xlR1C1) 'AK
CC3 = Cells(a, 29).Address(, , xlR1C1) 'AC
CC4 = Cells(a, 56).Address(, , xlR1C1) 'BD
CC5 = Cells(a, 92).Address(, , xlR1C1) 'CN
CC6 = Cells(a, 52).Address(, , xlR1C1) 'AZ
CC7 = Cells(a, 8).Address(, , xlR1C1) 'H
CC8 = Cells(a, 35).Address(, , xlR1C1) 'AI
CC9 = Cells(a, 27).Address(, , xlR1C1) 'AA
CC10 = Cells(a, 54).Address(, , xlR1C1) 'BB
CC11 = Cells(a, 90).Address(, , xlR1C1) 'CL
CC12 = Cells(a, 12).Address(, , xlR1C1) 'L
CC13 = Cells(a, 34).Address(, , xlR1C1) 'AH
CC14 = Cells(a, 26).Address(, , xlR1C1) 'Z
CC15 = Cells(a, 53).Address(, , xlR1C1) 'Ba
CC16 = Cells(a, 89).Address(, , xlR1C1) 'Ck
'Combine into argument
arg1 = "'" & Path & MM & "[" & FF & "]" & SS & CC1
arg2 = "'" & Path & MM & "[" & FF & "]" & SS & CC2
arg3 = "'" & Path & MM & "[" & FF & "]" & SS & CC3
arg4 = "'" & Path & MM & "[" & FF & "]" & SS & CC4
arg5 = "'" & Path & MM & "[" & FF & "]" & SS & CC5
arg6 = "'" & Path & MM & "[" & FF & "]" & SS & CC6
arg7 = "'" & Path & MM & "[" & FF & "]" & SS & CC7
arg8 = "'" & Path & MM & "[" & FF & "]" & SS & CC8
arg9 = "'" & Path & MM & "[" & FF & "]" & SS & CC9
arg10 = "'" & Path & MM & "[" & FF & "]" & SS & CC10
arg11 = "'" & Path & MM & "[" & FF & "]" & SS & CC11
arg12 = "'" & Path & MM & "[" & FF & "]" & SS & CC12
arg13 = "'" & Path & MM & "[" & FF & "]" & SS & CC13
arg14 = "'" & Path & MM & "[" & FF & "]" & SS & CC14
arg15 = "'" & Path & MM & "[" & FF & "]" & SS & CC15
arg16 = "'" & Path & MM & "[" & FF & "]" & SS & CC16
'
GetValue1 = ExecuteExcel4Macro(arg1)
GetValue2 = ExecuteExcel4Macro(arg2)
GetValue3 = ExecuteExcel4Macro(arg3)
GetValue4 = ExecuteExcel4Macro(arg4)
GetValue5 = ExecuteExcel4Macro(arg5)
GetValue6 = ExecuteExcel4Macro(arg6)
GetValue7 = ExecuteExcel4Macro(arg7)
GetValue8 = ExecuteExcel4Macro(arg8)
GetValue9 = ExecuteExcel4Macro(arg9)
GetValue10 = ExecuteExcel4Macro(arg10)
GetValue11 = ExecuteExcel4Macro(arg11)
GetValue12 = ExecuteExcel4Macro(arg12)
GetValue13 = ExecuteExcel4Macro(arg13)
GetValue14 = ExecuteExcel4Macro(arg14)
GetValue15 = ExecuteExcel4Macro(arg15)
GetValue16 = ExecuteExcel4Macro(arg16)
'
' at this point all the Get Values now hold the information that is important to us.
'we need to now place it in the sheet where required.
'
Cells(7*a - 5, 1) = GetValue6
Cells(7*a - 4, 3) = GetValue1
Cells(7*a - 3, 3) = GetValue2
Cells(7*a - 2, 3) = GetValue3
Cells(7*a - 1, 3) = GetValue4
Cells(7*a, 3) = GetValue5
Cells(7*a - 4, 4) = GetValue7
Cells(7*a - 3, 4) = GetValue8
Cells(7*a - 2, 4) = GetValue9
Cells(7*a - 1, 4) = GetValue10
Cells(7*a, 4) = GetValue11
Cells(7*a - 4, 4) = GetValue12
Cells(7*a - 3, 4) = GetValue13
Cells(7*a - 2, 4) = GetValue14
Cells(7*a - 1, 4) = GetValue15
Cells(7*a, 4) = GetValue16
Cells(7*a - 4, 2) = "Actual"
Cells(7*a - 3, 2) = "Design"
Cells(7*a - 2, 2) = "Code"
Cells(7*a - 1, 2) = "QAC"
Cells(7*a, 2) = "Unit Test"
Next a
'
'</pre>