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
 Multiply a cell for a number
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ispanico

Italy
2 Posts

Posted - 03/25/2015 :  7:57:51 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:

Hello,

this is my first time in this forum, and the first days I use OriginLab, so forgive me for this question:

having a number in a cell, can I multiply (or divide, or whatever math operation) for another number like the simple formula used in an Excel spreadsheet (for example, having the cell A1, I wanna multiply A1 for 10: in Excel I write = A1 * 10 , very simple)
I specify more clearly: I'm not asking how to multiply a column for another column. I mean a single cell, how can I multiply this for a number in a simple manner like in Excel, without open the menu "set the column values" ?


Edited by - ispanico on 03/25/2015 8:00:49 PM

jasonzhao

China
262 Posts

Posted - 03/25/2015 :  10:05:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

Please click Shift+Alt+3 to open the Script Window, then enter the script below:

col(2)[1]=col(2)[1]*10;  //multiply the cell(r=1,c=2) by 10

Click Enter to execute.
You can refer to this page for further informations.

http://www.originlab.com/doc/LabTalk/ref/Col-func#Col.28colNameOrNum.29.5BrowNum.5D


Best regards!
Jason
OriginLab Technical Service

Edited by - jasonzhao on 03/25/2015 10:08:47 PM
Go to Top of Page

ispanico

Italy
2 Posts

Posted - 03/26/2015 :  05:04:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok, but in this way there's no automatic recalculation (like Excel) if I change the cell value.
Go to Top of Page

snowli

USA
1384 Posts

Posted - 03/26/2015 :  10:08:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
How about choose Worksheet: Worksheet Script... menu and set it as follows.


This dialog allows you to enter script and condition when the script should run.
In image above, I set it so whenever there is change in column A, multiply col(A)[1] cell by 10

You can click Do it and enter values in col(A)[1] cell to see the effect.

You can then choose File: Save Template as to save this workbook template for future use.

Thanks, Snow
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