Inverting a whole column

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?

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.

Thanks in advance.

Mark

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

Hi,

If your goal is to only display the values according to a uniform
convention, you can define a cell numbering format that reverses the
display when compared to a "normal" display for the cells that contain
reverse-convention values. Something like this:

[<=0]# ##0;[>0]-# ##0;Standard

This will apply a "positve" format to a negative number, and a
"negative" format to a positive number, displaying "32" as "-32" and
vice-versa. Of course, this only changes the display. If you make any
calculations with these numbers, you will need to adjust your formula
accordingly but that is something relatively easy to do if your column
heading or a cell contains the name of the financial institution that
provided the value.

I hope this helps.

Rémy.

Cute. I never knew about that, and now wonder when those Operations started.

Between this and Rémy Gauthier's suggestion to overcome a formatting issue with clever formatting, reading this thread has been rewarded by elegance.

Many many thanks - the clever way works perfectly.

Mark