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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 adding column values
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bronco_bamma

1 Posts

Posted - 03/21/2014 :  11:38:23 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.)

jasonzhao

China
262 Posts

Posted - 03/24/2014 :  06:12:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000