Author |
Topic |
|
pink-lisa
UK
Posts |
Posted - 12/11/2006 : 07:27:12 AM
|
Origin Version 7
Hi,
I have 30 columns of data and I want to divide alternate columns by 3. I can do it using "set column values" and doing each column individually. However I need to do this for a lot of data. Is there a way I can do this in a worksheet in one go? |
|
Mike Buess
USA
3037 Posts |
Posted - 12/11/2006 : 08:07:26 AM
|
Enter one of these commands in the script window...
loop(i,1,wks.ncols) {if( mod(i,2)==1 ) wcol(i)/=3}; // divide cols 1, 3, 5, etc.
loop(i,1,wks.ncols) {if( mod(i,2)==0 ) wcol(i)/=3}; // divide cols 2, 4, 6, etc.
Mike Buess Origin WebRing Member |
|
|
pink-lisa
UK
Posts |
Posted - 12/12/2006 : 11:12:53 AM
|
That works. Thank you so much, Mike. I have never used the script thing before, Cheers. |
|
|
|
Topic |
|
|
|