LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-02-2019, 11:10 PM   #1
piobair
Member
 
Registered: Aug 2013
Distribution: Debian, Ubuntu
Posts: 192

Rep: Reputation: Disabled
convert formula results to fixed number?


I have a LibreOffice spreadsheet. I inserted a new column A and then generated ascending numbers. Then, if I sort on column C, the column A does not change, since the result of the sort apparently copies the formula instead of the value.

Is there some way to convert the calculated value to a fixed number so that it will sort correctly?
 
Old 12-02-2019, 11:18 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,099

Rep: Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393
Not at my desktop at the moment, so canít confirm this...
Highlight the column or the cells involved -> Copy -> Paste Special -> Values
Should overwrite the formulas with the resulting values.
 
Old 12-02-2019, 11:27 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,303

Rep: Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997
I'm not much of a spreadsheet user, never have been, but what if the initial "seed" value changes ?. Isn't that a major reason to use formula/function in the first place.
 
Old 12-10-2019, 10:13 AM   #4
piobair
Member
 
Registered: Aug 2013
Distribution: Debian, Ubuntu
Posts: 192

Original Poster
Rep: Reputation: Disabled
Three answers:
1. Copy the computed column to a text file, and then copy that text column back into the spreadsheet. Not knowing any better, this is how I did it. It is not pretty, but it works.
2. Copy the computed column, and then "paste special" into a new column. This is what I was actually looking for. "Paste special" allows the user to paste the actual number instead of the formula.
3. This one is really nifty. Enter a '1' in the top cell. There will be a dot at the bottom right corner of that cell. Drag that dot down to the desired number of cells. Problem solved!

Dragging that dot is really powerful. If you have a sequence (1, 4, 7), highlight those three cells and then drag the dot, you get 10, 13, 16 ... .
 
Old 12-10-2019, 03:09 PM   #5
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.7.1908
Posts: 4,099

Rep: Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393
Quote:
Originally Posted by piobair View Post
Three answers:
1. Copy the computed column to a text file, and then copy that text column back into the spreadsheet. Not knowing any better, this is how I did it. It is not pretty, but it works.
2. Copy the computed column, and then "paste special" into a new column. This is what I was actually looking for. "Paste special" allows the user to paste the actual number instead of the formula.
3. This one is really nifty. Enter a '1' in the top cell. There will be a dot at the bottom right corner of that cell. Drag that dot down to the desired number of cells. Problem solved!

Dragging that dot is really powerful. If you have a sequence (1, 4, 7), highlight those three cells and then drag the dot, you get 10, 13, 16 ... .
2. You don't have to Paste Special -> Values into a new column, you can just paste back into the column you copied from, if that's what you need to do.
3. If you hold Ctrl as you drag, the result will fill with (repeat) the seed number(s) instead of increment them. Watch out for alpha strings that end with a number you want to copy that way...I've accidentally changed "Server1" to "Server2..." in a list. Very ugly to clean up.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] awk: Convert large number to human readable (Mb,Gb, TB, PB) / round up/down results Rava Programming 3 02-23-2013 05:37 AM
convert number (not hex) into Decimal number drManhattan Programming 10 10-15-2011 09:53 PM
Identify and explain the major number, minor number, and revision number in Linux... turbomen Linux - Newbie 1 11-16-2010 03:48 AM
[SOLVED] What is the formula to convert a string to its binary form ? TheIndependentAquarius Programming 11 06-14-2010 09:39 AM
Bug in 8.04, fixed in 8.10 - How to get fixed in 8.04 which is LTS? taylorkh Ubuntu 4 02-28-2009 06:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration