Hi,
If I have understood what you want, the following LabTalk script can be referred to. This script will create a new workbook for the output data. For each column in sheet B, it will be divided by each row value in column 1 or 2 in sheet A, that is to say, if there are n rows in sheet A, there will be n output columns for each column in sheet B. So the number of columns in the output sheet will be the number of columns in sheet B multiplied by n.
int n = 5; // n rows in A, n+1 columns in B
range rAcol1 = [book1]A!col(1); // assume sheet A's book is book1, range to column 1
range rAcol2 = [book1]A!col(2); // assume sheet B's book is book1, range to column 2
range rB = [book1]B!; // range to sheet B
newbook; // create a new book for the output data
wks.nCols = rB.nCols*n; // set the number of columns in the output sheet (active one)
for(int ii = 1; ii <= n; ii++) // n rows
{
for(int jj = 1; jj <= n+1; jj++) // n+1 columns
{
range rBcoljj = [book1]B!wcol(jj); // column jj in sheet B
if(jj == 1) // x column
{
wcol(jj+(ii-1)*(n+1)) = rBcoljj/rAcol1[ii];
wks.col$(jj+(ii-1)*(n+1)).type = 4; // set as x column
}
else // y column
{
wcol(jj+(ii-1)*(n+1)) = rBcoljj/rAcol2[ii];
}
}
}
Penn