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
 adding column values

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
bronco_bamma Posted - 03/21/2014 : 11:38:23 PM
Origin Ver. and Service Release (Select Help-->About Origin): 8.5.1 SR2
Operating System: Windows 7

Hi!

I have a simple question:

I have several columns of data, and I want to add all of these columns to each other, i.e., I want to perform the operation

col(A)=col(B)+col(C)+...

However, performing the addition like this isn't very convenient when the number of columns is large. Is there a better way?

(BTW, Using

Analysis -> Mathematics -> Simple Math

only seems to give me the option to add two columns.)
1   L A T E S T    R E P L I E S    (Newest First)
jasonzhao Posted - 03/24/2014 : 06:12:26 AM
There are three solutions for this question:
1. You can use the "sum" function in your formula so that to calculate the sum of all columns through this worksheet:
Sum ([%h], 1, $(wks.ncols));

This formula can calculate the sum of all rows for all columns and saved into column

2. Use Descriptive Statistics
1) Select all the data you want to calculate, then select Statistics=>Descriptive Statistics=> Statistics on Rows=>Open Dialog
2) Check on Quantities to Compute=>Moments=>Sum is selected, then click OK, the results will be out put to a new column in this work sheet default.

3. Use Before Formula Scripts
1) Open Before Formula Scripts under the Set Values dialog
2) For example, if you want to calculate the sum on rows (from row j1 to row j2) from col(i1) to col(i2), you can type in code follows syntax below into Before Formula Scripts box:
rowstats irng:=col(i1)[j1]:col(i2)[j2] sum:=Col(m);

The results will be shown in Col (m)


Best regards,
Jason Zhao
OriginLab Tech Service


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