[SOLVED] LibreOffice5 Calc - how to recognise e.g. 1.5M as 1500000
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
LibreOffice5 Calc - how to recognise e.g. 1.5M as 1500000
I am using Linux Mint 17.3 Rosa Cinnamon.
I have been copying the results off the Google Stock Screener webpage and pasting them into the LibreOffice5 Calc spreadsheet. It does this with excellent ease, so 10/10 for Calc.
However the one thing it does not do is recognise e.g. 5.2M as 5200000.
Is there any way I can get it to do this rather than having to rewrite all the numbers by hand please?
Calc will not accept 5.2M as a number, and gives an error message when a cell with that in it is used in a formula.
It would also be nice to be able to be able to automatically load the data into a Linux spreadsheet, but do not know if this is possible.
Thanks.
Last edited by grumpyskeptic; 02-12-2017 at 04:58 PM.
I may be wrong, bb2, but I'm not sure that this is what grumpyskeptic is looking for. I think that they want to paste 12.3M, for example, into a cell and for it to be recognised as the number 12,300,000. What you're suggesting sort of works the other way round (in effect it controls display, not recognition): you paste 12300000 into a cell and it is displayed as 12.3M.
Just as a suggestion, I would have a column where I would paste my "1.2M" etc, and then a column next to it containing formulas along the lines of =VALUE(LEFT(A4,LEN(A4)-1))*1000000. Then I would use the calculated column as the basis of any further calculations.
This of course requires that the first column contains values strictly in the format of a decimal number followed immediately by the letter M (or any other letter but it would effectively mean "million").
Hydrurgas suggestion of using =VALUE(LEFT(A4,LEN(A4)-1))*1000000 to create another column should work, except that only about half the values in the column are in the M format.
How could I set up an if...then rule that would only apply the above if and only if the final character is M? And otherwise would just copy it unchanged.
I would also welcome any suggestions about downloading data from Google Stock Screener or historical shares data non-manually within Linux.
Calc would not let me copy the formula so I had to copy it by hand.
Edit: I have since tried several ways to copy a formula from Calc into a text editor. The only way I have found that works is to click on a cell, highlight the contents of the slot which is towards the top of the screen, and then press Ctrl-C to copy it. As this wrecks the formula then it is best to do this on a copy of the spreadsheet.
I wish Calc would make it easier to copy or paste formulas, as it is often helpful to study and check a complicated formula outside the spreadsheet.
Last edited by grumpyskeptic; 02-15-2017 at 01:42 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.