In fact, I'll post my block of code here because I'm not sure if its going to work properly, and could do with some feedback on it. I can't test it myself until I know how to find the number of rows. Basically I've got a worksheet of binned data, and I'm trying to find the frequency by percentage to plot, so I'm looping through each row in each column and placing its percentage value in another worksheet, then I will plot my graph from the worksheet percWks.
window -a percWks;
for (mm = 1, mm <= nCol; mm++) // for number of columns
{
sum(%(binWks,mm));
colSum = sum.total;
nRows = // how do I do this?!
for (nn = 1, nn <= nRows; nn++) // for number of rows
{
percWks_$(col($(mm)[nn])) = (binWks_$(col($(mm)[nn])) / colSum) * 100;
}
}
Is this code valid?