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
 Pick specific cells from different worksheets

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
mar_pav Posted - 11/01/2020 : 5:15:07 PM
Dear,

I would appreciate it very much if someone could help me with the following problem.

I have a workbook with several worksheets and want to create a new one, which will have a column with their rows containing the data from the same specific cell of these worksheets.

I´ve tried to solve this problem creating a new workbook and trying to copy the desired cells using the following command lines, without success:

for (ii=1,ii<=page.nlayers,i++) {
range r1 = [BookName]$(ii)!wcol(2)[31:31];
wcol(1)[$(ii)]=r1;
}

Unfortunately, this code doesn´t work but I do not understand why. Thank you! Marcelo.
2   L A T E S T    R E P L I E S    (Newest First)
mar_pav Posted - 11/01/2020 : 10:39:01 PM
Thanks very much, CP!

I see things (and consequently concepts) are mixed up in my code.

Best, Marcelo.
cpyang Posted - 11/01/2020 : 7:43:40 PM
There are several errors in your code, but here is the code that work:


//assume source in book1 and result in book2
range rdest = [Book2]1!wcol(1);
int nsheets = [Book1]!page.nlayers;

for (ii=1;ii<=nsheets;ii++) {
	range r1 = [Book1]$(ii)!wcol(2);
	rdest[ii] = r1[31];
}



CP

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