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
 subtract 2 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
finner1984 Posted - 06/26/2010 : 08:06:00 AM
Hey guys,

i wanna subtract 2 worksheets (both in the same workbook) from each other. Unfortunately, i didnt find a solution yet.

Example: i have a workbook (book1) with 3 Sheets (Sheet1 to Sheet3). Now i want that:

book1_Sheet3_colB = book1_Sheet1_colB - book1_Sheet2_colB. And so on for the other columns.

I think the Syntax Workbook_column does only work for books. I tried book1_sheet1_A, but Origin doenst understand that.

Im using Origin 8.

Thanks.


3   L A T E S T    R E P L I E S    (Newest First)
finner1984 Posted - 06/29/2010 : 09:57:45 AM
yeap, that works!
Thank you AmandaLu and DataConv!
DataConv Posted - 06/28/2010 : 04:08:41 AM
Additionally, i would suggest to use the index mode rather than the name mode.
E.g.: Instead of [book2]Sheet1!B it looks like [book2]1!Col(2). At first, this seems to be more complicated. There are worksheet manipulations or if you are using the same name multiple times, where the name mode fails, the index mode however still works...

An additional note to the example of AmandaLu: there is an easy way to insert the ranges. Just use in the tab 'variables' the 'insert range variable' tool in the 'calculate rows' tool.
AmandaLu Posted - 06/27/2010 : 11:22:51 PM
Dear finner1984,

Workbook_column is the old syntax and cannot refer to sheet level. To subtract 2 worksheet columns, you can use Range variable:

range r1 = [book2]Sheet1!B;
range r2 = [book2]Sheet2!B;
range r3 = [book2]sheet3!B;
r3=r1-r2;

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