Hey first off thanks for stopping by.
Requirements: I have two sheets of data. First sheet("SCENARIO") defines the amount of lines needed to replicate, and the data that needs to be replicated. The second sheet("DATA") houses the unique data to UNION to the first sheet. It then needs to spit out that data to the "OUTPUT" sheet.
Example of how each sheet looks/works:
SCENARIO
File Name,MD5_ID,Cnt1,Cnt2,Virtual Users,Iterations,File Copies Count
filename,ea3542917df7ae1693e6a6b0aba211fed8818dd2f4bce634c0339a98b743e65b,37500,2,2,2,2
DATA
UserID,CustomerID,Field1,Field2,Field3,Virtual _User
userID_1,1234567891,Test_TCC1,1234,TEST0002348
userID_2,9999999999,Test_TCC2,9999,TEST0009999
OUTPUT
UserID,CustomerID,Field1,Field2,Field3,MD5_ID,pFileName,Cnt1,Cnt2,Virtual _User
userID_1,1234567891,Test_TCC1,1234,TEST0002348,ea3542917df7ae1693e6a6b0aba211fed8818dd2f4bce634c0339a98b743e65b,filename,37500,1,V1
userID_1,1234567891,Test_TCC1,1234,TEST0002348,ea3542917df7ae1693e6a6b0aba211fed8818dd2f4bce634c0339a98b743e65b,filename,37500,1,V1
userID_2,9999999999,Test_TCC2,9999,TEST0009999,ea3542917df7ae1693e6a6b0aba211fed8818dd2f4bce634c0339a98b743e65b,filename_Copy,37500,1,V2
userID_2,9999999999,Test_TCC2,9999,TEST0009999,ea3542917df7ae1693e6a6b0aba211fed8818dd2f4bce634c0339a98b743e65b,filename_Copy,37500,1,V2
So the UNION seems straight forward, however the kicker is the "Iterations", "Copies", and "Virtual_User" columns.
Iterations = This is the amount of lines it needs to create in the OUTPUT sheet per "Virtual_Users"
Copies = how many times the file needs a copy available to the virtual user to access. So for example each virtual users needs access to its own file, as it needs write access. So VU1 uses "file_name", and VU2 uses "file_name_copy" and so forth. VU1 uses that same file for 2 iterations, and VU2 uses file_name_copy for 2 iterations.
Virtual_User = tag that tells which virtual user uses that row.
what I was starting to do was the following:
For each cell in range of scenario sheet, loop through the amount of iterations, and associate the unique data of sheet "DATA". Then spit that out to a sheet, or if its easier to another file.
Any ideas or some code to get me on the right track?
Thanks!
Requirements: I have two sheets of data. First sheet("SCENARIO") defines the amount of lines needed to replicate, and the data that needs to be replicated. The second sheet("DATA") houses the unique data to UNION to the first sheet. It then needs to spit out that data to the "OUTPUT" sheet.
Example of how each sheet looks/works:
SCENARIO
File Name,MD5_ID,Cnt1,Cnt2,Virtual Users,Iterations,File Copies Count
filename,ea3542917df7ae1693e6a6b0aba211fed8818dd2f4bce634c0339a98b743e65b,37500,2,2,2,2
DATA
UserID,CustomerID,Field1,Field2,Field3,Virtual _User
userID_1,1234567891,Test_TCC1,1234,TEST0002348
userID_2,9999999999,Test_TCC2,9999,TEST0009999
OUTPUT
UserID,CustomerID,Field1,Field2,Field3,MD5_ID,pFileName,Cnt1,Cnt2,Virtual _User
userID_1,1234567891,Test_TCC1,1234,TEST0002348,ea3542917df7ae1693e6a6b0aba211fed8818dd2f4bce634c0339a98b743e65b,filename,37500,1,V1
userID_1,1234567891,Test_TCC1,1234,TEST0002348,ea3542917df7ae1693e6a6b0aba211fed8818dd2f4bce634c0339a98b743e65b,filename,37500,1,V1
userID_2,9999999999,Test_TCC2,9999,TEST0009999,ea3542917df7ae1693e6a6b0aba211fed8818dd2f4bce634c0339a98b743e65b,filename_Copy,37500,1,V2
userID_2,9999999999,Test_TCC2,9999,TEST0009999,ea3542917df7ae1693e6a6b0aba211fed8818dd2f4bce634c0339a98b743e65b,filename_Copy,37500,1,V2
So the UNION seems straight forward, however the kicker is the "Iterations", "Copies", and "Virtual_User" columns.
Iterations = This is the amount of lines it needs to create in the OUTPUT sheet per "Virtual_Users"
Copies = how many times the file needs a copy available to the virtual user to access. So for example each virtual users needs access to its own file, as it needs write access. So VU1 uses "file_name", and VU2 uses "file_name_copy" and so forth. VU1 uses that same file for 2 iterations, and VU2 uses file_name_copy for 2 iterations.
Virtual_User = tag that tells which virtual user uses that row.
what I was starting to do was the following:
For each cell in range of scenario sheet, loop through the amount of iterations, and associate the unique data of sheet "DATA". Then spit that out to a sheet, or if its easier to another file.
Any ideas or some code to get me on the right track?
Thanks!