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
 Maximum Value
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

DFingerhut

3 Posts

Posted - 07/01/2011 :  03:52:33 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I have a worksheet with 1000 Values in column A (row 1-1000). Now I would like to estimate the maximum value of column A and to put this value automatically into column B (row 1). I would like to use "set column values" istead of the descriptive statistics function, because so I have to copy and paste the values manually.
May somebody help me with this topic?

Thanks!
Daniel

cpyang

USA
1406 Posts

Posted - 07/01/2011 :  08:28:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You have to use the Before Formula Scripts

If this is used for col(A) and col(B) only, then put the following script into the Before Formula Scripts box in Col(B)'s Set Column Values dialog


sum(col(A));
col(B)[1]=sum.max;



You can then turn on Recalculate to Auto.

If you want this to be general, to calculate from previous column, then write it such that it can be applied to other columns:


sum(wcol(_ThisColNum-1));
wcol(_ThisColNum)[1]=sum.max;


To find out about the sum function in Labtalk, just google "labtalk sum" and it will land to this link

http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Sum_(object)

CP
Go to Top of Page

DFingerhut

3 Posts

Posted - 07/02/2011 :  2:34:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you!!!!!!
It works!!!
Go to Top of Page

naeem498

17 Posts

Posted - 05/04/2012 :  11:02:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
What if I want to have selective rows to choose from in column A. Lets say, from row 25-70 (in column A) I want to find maximum number and put it in B. Thanks
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 05/04/2012 :  2:25:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can set the range defined by the range notation such as:

range rr=col(A)[25:70];
sum(rr);
col(B)[1]=sum.max;

--Hideo Fujii
OriginLab
Go to Top of Page

naeem498

17 Posts

Posted - 05/08/2012 :  02:56:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you very much. Its perfect.
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