Good morning! I'm so stuck.
I have a multi column array that has a file type and with the file type I have an array of ranges I want to copy from and an array I want to copy to in the other columns.

What I would like is for each file type...
Copy the data from one location in the first sheet to another location in a second sheet.
I'm trying to compile data from 21 sheets in 20 different files on a regular basis.
I can get the first array to loop through but I can't figure out how to pull from the second one without making another loop.
I don't want to loop through the second array, I only want the destination range associated with the source range.
Then I know I will have to do more to get through the sheets etc.

Any help would be greatly appreciated.
I have been fighting with this a couple days.


Private Sub RunSummary()

Dim str_FileLocation As String
Dim obj_ImportWorkbook As Object

Dim str_PrimaryData As Variant
Dim str_PrimaryDataOutputRow As Variant

Dim I As Long
Dim arr_Type(2, 3) As Variant

arr_Type(0, 0) = "FileType1"
arr_Type(0, 1) = "G9:G10,G16:G17,G23:G35,G41:G42,G48" 'Copy From
arr_Type(0, 2) = "B3,B6,B9,B23,B26" 'Copy to

arr_Type(1, 0) = "FileType2"
arr_Type(1, 1) = "G9:G10,G16:G17,G23:G35,G41:G42,G48,G52:G56" 'Copy From
arr_Type(1, 2) = "B3,B6,B9,B23,B26,B28" 'Copy to

str_FileLocation = "J:\Projects\Project1\TestFiles\2021\4Q\FILENAME_CCODE_4Q_2021.xlsm"


For I = LBound(arr_Type, 1) To UBound(arr_Type, 1)

Set obj_ImportWorkbook = Workbooks.Open(Filename:=str_FileLocation)

str_PrimaryData = Split(arr_Type(I, 1), ",")
str_PrimaryDataOutputRow = Split(arr_Type(I, 2), ",")

For Each str_PrimaryData In str_PrimaryDataOutputRow
obj_ImportWorkbook.Worksheets("SHEETNAME 2021 4Q").Range(str_PrimaryData).Copy ThisWorkbook.Worksheets("CCODE").Range(str_PrimaryDataOutputRow)
Next
Next I

obj_ImportWorkbook.Close

End Sub