The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Deleting every nth column

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
zango24 Posted - 07/20/2006 : 08:03:03 AM
Origin Version (Select Help-->About Origin): 7.5
Operating System: Windows XP

Dear Friends,
I would like a help. I would like to select every nth column (for example every 3rd column) out of many column. Or if possible I would like to delete the every "group of columns". Means if I have many columns, I want to select 1st column and delete 2nd 3rd 4th column, then select 5th column, then again delete 6th 7th and 8th column then select 9th column and so on.

Help in terms of short script is very valuable.
Thanks in advance.
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 07/20/2006 : 09:32:04 AM
1. This will select columns 1, 4, 7, etc.

wo -s -1 0 -1 0; // deselect all columns
for(i=1;i<=wks.ncols;i+=3) wks.colsel(i);


2. This will delete columns 2-4, 6-8, etc.

wo -d; // duplicate worksheet
for(i=1;i<=wks.ncols;i++) {
if( mod(i-1,4) ) wks.colsel(i);
};
menu -e 36442; // delete selected columns (execute Edit > Delete)
wo -s 0 0 0 0; // select all columns

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/20/2006 09:32:52 AM

Edited by - Mike Buess on 07/20/2006 10:05:12 AM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000