T O P I C R E V I E W |
MacS73 |
Posted - 09/16/2016 : 10:02:16 AM How can I sum up the values of another column in a new one: e.g.: (first column is given, secons is to be calculated):
0 0 1 1 3 4 5 9 0 9 0 9 3 12 2 14
I think this should be working with the set comumn value function however I would need to memorize the value of the previous index, don't know how to do this...
Thank you.
Origin Ver. and Service Release: Origin 2015 SR3 Operating System: Windows 7 |
4 L A T E S T R E P L I E S (Newest First) |
MacS73 |
Posted - 09/19/2016 : 05:48:13 AM Does exactly what I wanted. I knew there's a simple sulution in Origin for it.
Thank you! |
yuki_wu |
Posted - 09/19/2016 : 03:26:01 AM Hi,
You can try the function sum(vd).
1. Highlight Column B and then right click to select Set Column Values… in the context menu. 2. Type sum(col(A)) in the Column Formula box 3. Click OK button
Hope it helps.
Regards, Yuki OriginLab |
MacS73 |
Posted - 09/19/2016 : 01:40:10 AM I'm sorry I did not clearly express my intention. Please let me try again:
I have a given colum of numbers, say col(A)[1], col(A)[2], ... col(A)[n]
What I want to create is the setp wise integration of col(A), i.e. the result of col(B) I want to create is:
col(B)[1] = col(A)[1] col(B)[2] = col(A)[1]+ col(A)[2] col(B)[3] = col(A)[1]+ col(A)[2]+ col(A)[3] col(B)[4] = col(A)[1]+ col(A)[2]+ col(A)[3]+ col(A)[4]
...
col(B)[n] = col(A)[1]+ col(A)[2]+ ... + col(A)[n]
Now it should be clear what I mean. Do I need a script with a loop for that or can this be done in a sompler manner? Thank you! |
KenLefebvre |
Posted - 09/16/2016 : 11:23:07 AM Hi there- I'm not sure I entirely understand your question, do you mean how to add two columns together? Or rather how to sum all values in that column? To add them together you would simply type in the f(x) row col(A) + col(B), but if you wanted to create a column C that was equal to the sum of all values in column B, you would enter SUM(col(B)) in C's f(X) box.
If you wanted to take a single value from any of these columns you would type in the syntax as col(B)[3], which in this case would equal the third value of column B, 4.
Sorry if this isn't the information you were looking for, I hope this helps but if not, if you could reword your question I'd be glad to help you figure this out!
Ken
Ken Lefebvre Technical Service Engineer OriginLab |