A cell containing both a function and an input option

Discuss the spreadsheet application
Post Reply
richardgmsummers
Posts: 2
Joined: Sun Oct 14, 2018 10:10 am

A cell containing both a function and an input option

Post by richardgmsummers »

Hi. I may be trying to do the impossible - but it's worth asking. In open office calc is it possible to set up a cell so that it has all of the following:
1) contains a function that incorporates the values in neighbouring cells
2) also allows that same cell to have a value manually inputted into it. This inputted value is to override the function and become that cells value.
3) If the manually inputted value is deleted then that the cell would revert back to the aforementioned function

This could maybe be achieved through a tool that sets a cell's default state as something other than empty/blank or maybe a tool that can create layers within a cell where conditions decide which layer is active. Is anything like this possible? Thank you in advance for any thoughts.
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: A cell containing both a function and an input option

Post by Zizi64 »

Use a helper cell to input values and use a conditional formula in tha main cell.

=IF(ISBLANK(TheHelperCell);aFormulaWhenTheHelperCellIsEmpty;aFormulaWithTheValueOfTheHelperCell)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: A cell containing both a function and an input option

Post by RusselB »

Quite simply, in most spreadsheet programs, you can't do all that you are asking for, as entering a value into a cell that contains a formula destroys the formula for that cell.
I only know of one spreadsheet program that has (had?) the ability to recall a previous formula after the entry had been changed using a fixed value.
Forum rules stop me from specifying the program, and I don't know if the most recent versions still have this ability.

That said, Zizi's suggestion of using a helper cell matches the best option that I can come up with.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: A cell containing both a function and an input option

Post by Zizi64 »

...or you can create your own macro for this task. Here is a similar one:
Event_ContentChanged2.ods
(12.8 KiB) Downloaded 64 times
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
richardgmsummers
Posts: 2
Joined: Sun Oct 14, 2018 10:10 am

Re: A cell containing both a function and an input option

Post by richardgmsummers »

I will investigate macros. Thank you
Apache OpenOffice 4.1.1
Windows 10 Home
Post Reply