[Solved] Adding amount to a selection

Discuss the spreadsheet application
Post Reply
adrian
Posts: 4
Joined: Tue Nov 20, 2007 8:04 pm

[Solved] Adding amount to a selection

Post by adrian »

To add a certain amount to every number in a column? Like i have a column full of different number values... is there a way to increase all of them by the same number like 20?
 Edit: Changed the title (was "Is there a way...") and tagged the thread as Solved, even if no feedback from OP.
Hagar 
Last edited by Hagar Delest on Mon Jun 09, 2008 5:15 pm, edited 2 times in total.
Reason: tagged the thread as Solved.
User avatar
Hagar Delest
Moderator
Posts: 32628
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Is there a way...

Post by Hagar Delest »

Type 20 in a cell, copy it then paste special (either CTRL+SHIFT+V or Edit>Paste special) and on the right, select Add.

Thanks to add '[Solved]' in your first post title (edit button) if your issue has been fixed.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Is there a way...

Post by acknak »

Hagar's suggestion is good, and easy, but if the original values are your raw data, you may wish to preserve them, so in the future you can go back and see exactly what was done, and back it out or otherwise change the analysis.

If that is the case, you can do the addition by changing the current values to a formula:

Select the cells to change
Edit > Find & Replace
Search for: .*
Replace with: =&+20
Options / Regular expressions: YES
Options / Current selection only: YES
Replace all

This changes a value, like "123.45" to a formula: =123.45+20, so the original data are still there, if you ever need to know.

Even better, if you can, just use a separate column for the calculation.
AOO4/LO5 • Linux • Fedora 23
Post Reply