OK, I am trying to make a macro-enabled workbook template. I am fairly new at marcoing so there is gaps in my knowledge on how to code. I would like help writing explicit code on what I want it to do.
This is what the first sheet looks like. The template has 19 sheets.
1.png (image 1)
Briefly, the stuff in columns A and B should be straight forward. B1 is the folder path to where all the data files are located.
Column D is an arbitrary numbering system which can change depending on what data we have, so don't use that as a counter reference.
Column E is what sheet all the data goes. As you can see, there are 16 sheets and each sheet can hold 9 file names.
Column F, G, and H are copy-pasted from a command prompt batch file:

in this case, it is:
Please Login or Register  to view this content.
where the output file is in alphabetical order so the user can just paste the RL..., RT..., and RD... files to the correct column.
If there is a way to do this in Excel, that would be great, but the current method for file name extraction works pretty well

So I written code and pseudo code for what I want to do for the template. For the parts written in pseudo code, I need some help
Please Login or Register  to view this content.
2.png (Image 2)
*need help here*
'Set the 16 worksheets where data is imported
'Set the raw data sheet
'for all 16 data import worksheets .Range("A3:BA102").ClearContents

Please Login or Register  to view this content.
*need help here*
'I probably need to write a subroutine and pass all the variables:
..so basically, the raw data result files all have the ".res" extension but for those familiar with the text "origin code," it's equal to 437.

An example of a raw data file looks like this: (there are 81 to 144 raw data files that must be imported to this template:
Please Login or Register  to view this content.
*need serious help here*
So basically, I don't know how to write this part of the code:

What I want to do is take each individual file name (image 1) from columns F, G, and H and import one-by-one into the "raw data" sheet (image 2).
I need a nested for loop.
basically, the loop should reach each individual file name horizontally across the rows and then zig-zag down the columns:

So, from image 1, it should read:
RLH12p
RTH12p
RDH12p
RLH22p
RTH22p
RDH22p
RLH32p
RTH32p
RDH32p
...etc (note: there is no pattern with the file names. It could be named anything)

For the first file name, I want "RLH12p" to attach a ".res" extension behind it and then import it from the correct file location to the "raw data" sheet.

upon recording myself, I got the code:
Please Login or Register  to view this content.
Not sure if I could use this

Here is the code to process the raw data. I don't know how to activate the "raw data" sheet for this code to work there:
Please Login or Register  to view this content.
Now, the raw data sheet looks like this:
3.png (image 3)

I want to copy the data set of the first region and paste it into the designated sheet (refer to the caption under image 1):
For the data collected from RLH12p, the first set of data needs to be pasted in column A and B, the second set needs to be pasted in column J and K
4.png (image 4)
So for the first sheet,
RLH12p has data in AB and JK
RTH12p has data in DE and MN
RDH12p has data in GH and PQ
RLH22p has data in ST and ABAC
RTH22p has data in VW and AEAF
RDH22p has data in YZ and AHAI
RLH32p has data in AKAL and ATAU
RTH32p has data in ANAO and AWAX
RDH32p has data in AQAR and AZBA

this needs to be looped

Now, for the next set of 9 file names, the next sheet needs to be activated. All sheets look congruent. But for RLH42p to RDH62p, it undergoes the same scheme.

.....this was the old code. obviously, the new code is different but you can refer to it:

Please Login or Register  to view this content.
But basically, that's the end of the program...loop through everything, get the file name, trim the raw data, place the correct raw data in the correct activated sheet.

If anyone could help me do this, I would appreciate it.
Thanks