You are not logged in.

#1 2014-07-20 16:34:28

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

[SOLVED] libreoffice calc variable defining

Hi to everybody,
I need to define a variable/constant in Excel / libreoffice calc.
E.g.:
I need the universal gas constant R=8.1345
And I must use it in many formulas such as =A1*B2*8.3145*(C3-D4)
Now, does exist any way to store the constant in a variable and use it in the formulas in this way: =A1*B2*r*(C3-D4)
Saving my time !!!

Thank you

Last edited by nTia89 (2014-07-20 17:34:59)


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#2 2014-07-20 16:41:14

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: [SOLVED] libreoffice calc variable defining

You can force an absolute reference to a cell as opposed to a relative reference by using a $ in front of the row or column.   If you put the value of R in a Cell, say A123, refer to that cell in your equations as $A$123.  When you copy formulae that contain that form and paste them elsewhere, references that use the $form are not updated based on the relative location to where the formula is pasted.  It would take the form:

A1*B2*$A$123*(C3-D4)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2014-07-20 16:47:30

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] libreoffice calc variable defining

ewaller wrote:

You can force an absolute reference to a cell as opposed to a relative reference by using a $ in front of the row or column.   If you put the value of R in a Cell, say A123, refer to that cell in your equations as $A$123.  When you copy formulae that contain that form and paste them elsewhere, references that use the $form are not updated based on the relative location to where the formula is pasted.  It would take the form:

A1*B2*$A$123*(C3-D4)

I understand what do you mean, but this is not what I need!


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#4 2014-07-20 16:54:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [SOLVED] libreoffice calc variable defining

It's exactly what you need.  Store the constant in a cell of your choosing and reference that cell in your calculations.

Offline

#5 2014-07-20 16:59:00

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] libreoffice calc variable defining

No, in this way I simply use the cell reference...


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#6 2014-07-20 17:01:09

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [SOLVED] libreoffice calc variable defining

Yes... How is that not what you asked to have?

Offline

#7 2014-07-20 17:04:55

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] libreoffice calc variable defining

I need this:
cell with inside

=r

should shows

8.3145

I'd get the same result with

=$A$123

BUT it's not what I want


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#8 2014-07-20 17:07:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [SOLVED] libreoffice calc variable defining

You'll have to type several characters rather than one, but it allows you to redefine the variable.

Offline

#9 2014-07-20 17:12:06

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: [SOLVED] libreoffice calc variable defining

Perhaps this

Anyway, as this thread has nothing do with Arch, and the link I provided is applicable to Excel, which only runs on proprietary operating systems, I am going to put on my moderator's cap and close and bin  this thread IAW https://wiki.archlinux.org/index.php/Fo … pport_ONLY


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#10 2014-07-20 17:12:13

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] libreoffice calc variable defining

OK, but this is only a "workaround"...

I know this is possible because I have an xls with that


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#11 2014-07-20 17:27:27

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: [SOLVED] libreoffice calc variable defining

I read your report to the moderators and have reconsidered my position.  I have reopened the thread and have moved it to Applications and Desktop Environments.  I do ask that you change the thread title to reflect software that is available in our repositories.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#12 2014-07-20 17:39:16

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: [SOLVED] libreoffice calc variable defining

Solved!

You can define a variable with the name manager, the other input field on the left of the input field formula.

There are many options but basically you need to choice a name (with some restriction) and select the cell...


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

Board footer

Powered by FluxBB