[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libreoffice-users] Inverting a whole column


At 16:11 29/06/2020 -0700, Mark Noname wrote:
I have spreadsheets from my financial institutions (for tax purposes). Some of them do the deposits as positive and the debits as negative, and others do the reverse. Is there an easy way to multiply an entire column by -1 so I can make them all fit a uniform convention?

Of course.

Obvious way:
o Suppose your values are in column A, starting at row 2.
o In a new column, enter =-A2 in row 2.
o Fill down the new column.
o Cut or Copy the values in the new column.
o Paste back over column A, but using Edit | Paste Special... (or Ctrl+Shift+V) instead of ordinary Paste.
o In the Paste Special dialogue, ensure that Formulas is *not* ticked.
o Delete the new column.

Clever way:
o Enter -1 in a spare cell somewhere.
o Copy that value.
o Select the range of values to be negated.
o Go to Edit | Paste Special... (or Ctrl+Shift+V).
o In the Paste Special dialogue, under Operations, select Multiply.

What I've done before is convert the spreadsheets to .csv, use a shell script to invert the chosen column and then convert back to .ods. This is really clunky.

There are always unnecessarily complicated ways to solve any problem.

I trust this helps.

Brian Barker


--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Follow-Ups:
Re: [libreoffice-users] Inverting a whole columnJohn Kaufmann <kaufmann@nb.net>
References:
[libreoffice-users] Inverting a whole columnMR ZenWiz <mrzenwiz@gmail.com>
Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.