[Solved] Make formulas adjust after inserting rows

Discuss the spreadsheet application
Post Reply
COKEDUDE
Posts: 18
Joined: Tue Apr 12, 2011 8:20 pm

[Solved] Make formulas adjust after inserting rows

Post by COKEDUDE »

I have several formulas like this:

=SUM(C15:C20)

After I insert rows I want it to change to this:

=SUM(C15:C26)

Is there an easy way to make it auto adjust to this? I always have to go in there and manually change it. Is there an easier or automatic way to do this?
Last edited by Hagar Delest on Tue Mar 13, 2018 8:56 am, edited 1 time in total.
Reason: tagged solved
OpenOffice 3.1 on Windows Vista / NeoOffice 2.2.3 with MacOS 10.4 / OpenOffice 2.4 on Ubuntu 9.04
User avatar
robleyd
Moderator
Posts: 5079
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: make formulas adjust after inserting rows

Post by robleyd »

Go to Tools | Options | OpenOffice Calc | General and under Input settings ensure Expand references when new columns/rows are inserted is checked.

From the offline help - F1:
Expand references when new columns/rows are inserted

Specifies whether to expand references when inserting columns or rows adjacent to the reference range. This is only possible if the reference range, where the column or row is inserted, originally spanned at least two cells in the desired direction.

Example: If the range A1:B1 is referenced in a formula and you insert a new column after column B, the reference is expanded to A1:C1. If the range A1:B1 is referenced and a new row is inserted under row 1, the reference is not expanded, since there is only a single cell in the vertical direction.
If you insert rows or columns in the middle of a reference area, the reference is always expanded.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
COKEDUDE
Posts: 18
Joined: Tue Apr 12, 2011 8:20 pm

Re: make formulas adjust after inserting rows

Post by COKEDUDE »

robleyd wrote:Go to Tools | Options | OpenOffice Calc | General and under Input settings ensure Expand references when new columns/rows are inserted is checked.

From the offline help - F1:
Expand references when new columns/rows are inserted

Specifies whether to expand references when inserting columns or rows adjacent to the reference range. This is only possible if the reference range, where the column or row is inserted, originally spanned at least two cells in the desired direction.

Example: If the range A1:B1 is referenced in a formula and you insert a new column after column B, the reference is expanded to A1:C1. If the range A1:B1 is referenced and a new row is inserted under row 1, the reference is not expanded, since there is only a single cell in the vertical direction.
If you insert rows or columns in the middle of a reference area, the reference is always expanded.
OMG THANK YOU. That has been driving me crazy for awhile. Any idea why that is not a default feature?

Will the Expand Formatting option keep the currency option with the "$" dollar sign enabled? I already selected an entire column and enabled the currency feature but I keep having to enable it again.

https://pixhost.org/show/408/65907268_l ... atting.jpg

Image
OpenOffice 3.1 on Windows Vista / NeoOffice 2.2.3 with MacOS 10.4 / OpenOffice 2.4 on Ubuntu 9.04
User avatar
robleyd
Moderator
Posts: 5079
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: make formulas adjust after inserting rows

Post by robleyd »

Did you try it? Help says:
Expand formatting
Specifies whether to automatically apply the formatting attributes of the selected cell to the empty adjacent cells. If, for example, the content of the selected cell has the bold attribute, this bold attribute will also apply to adjacent cells. Cells that already have a special format will not be modified by this function. You can see the range in question by pressing the Ctrl + * (multiplication sign on the number pad) shortcut. This format also applies to all new values inserted within this range. The normal default settings apply to cells outside this range.
If it doesn't do what you want, consider the script in [Calc, Python]Expand/shrink list ranges.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Post Reply