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 for Programming
 LabTalk Forum
 Range issue

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
touch41 Posted - 08/27/2012 : 12:34:43 PM
Dear all,
I have an issue with ranges that is puzzling me.
I want the script to copy the content of a range of cells in of two columns, and paste it into two other columns.

The code I tries is:

range aa = 1[1]:2[10];
range bb = 3[1]:4[10];
bb=aa;

So I want to copy the content of cells 1 to 10 of columns 1 and 2, into cells 1 to 10 of columns 3 and 4. Same book, same sheet.

If I run this, all I get is that the content of column 1 from cell 1 to cell 10, is copied into column 3.

What's wrong?

I've managed to keep working by using two single column assigments, but I'd prefer to learn how to deal with two dimensional ranges...

Thank you very much for your help!

Best,

Matteo



Origin Ver.8.5 and Service Release 1
Operating System: Windows 7 professional
2   L A T E S T    R E P L I E S    (Newest First)
touch41 Posted - 08/28/2012 : 09:20:22 AM
That actually works!
Thank you very much!:-)

Best,

Matteo


quote:
Originally posted by JessieWoo

Hi, Matteo

You can try the following code to copy aa to bb:
range aa = 1[1]:2[10];
range bb = 3[1]:4[10];
copydata aa bb;

Please refer to the following page for more detail of "copydata":
http://wiki.originlab.com/~originla/wiki2/index.php?title=X-Function:Copydata

Best Regard,
Jessie
Originlab Corp.


JessieWoo Posted - 08/28/2012 : 04:46:21 AM
Hi, Matteo

You can try the following code to copy aa to bb:
range aa = 1[1]:2[10];
range bb = 3[1]:4[10];
copydata aa bb;

Please refer to the following page for more detail of "copydata":
http://wiki.originlab.com/~originla/wiki2/index.php?title=X-Function:Copydata

Best Regard,
Jessie
Originlab Corp.

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