Bug 68034 - Goal Seek unsuccessful if variable cell is empty
Summary: Goal Seek unsuccessful if variable cell is empty
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: Other All
: medium enhancement
Assignee: Mike Kaganski
URL:
Whiteboard: target:25.2.0 target:24.8.0.0.beta2
Keywords:
: 117760 (view as bug list)
Depends on:
Blocks: GoalSeek
  Show dependency treegraph
 
Reported: 2013-08-12 21:04 UTC by Eike Rathke
Modified: 2024-06-17 22:08 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Rathke 2013-08-12 21:04:44 UTC
New spreadsheet
A1: =SQRT(B1)
Do not enter any value in B1

Tools->GoalSeek
Formula cell: $A$1
Target value: 2
Variable cell: $B$1

OK => not successful, closest value 0

Expected: successful, value 4
Comment 1 Eike Rathke 2013-08-12 21:52:43 UTC
Detail: current implementation needs an existing value cell as variable cell that can be changed and the change broadcasted to recalculate the dependent formula cell(s). Probably that value cell needs to be temporarily added to the document if it doesn't exist. Needs to be checked though if doing so would interfere with ChangeTracking or cell protection or have other unwanted side effects.
Comment 2 Buovjaga 2018-06-18 07:01:46 UTC
*** Bug 117760 has been marked as a duplicate of this bug. ***
Comment 3 Buovjaga 2018-06-18 07:02:42 UTC
On testing the duplicate, I noticed that it succeeds in 3.5.0, but maybe this is not news to you.
Comment 5 Commit Notification 2024-06-14 17:31:01 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6fc21353bb30e71e2fc4d47394bf7ec2e704a454

tdf#68034: set the variable cell to value temporarily if needed

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 BogdanB 2024-06-14 19:25:49 UTC
Eike, thanks for reporting, and Mike for solving a very old bug.

It's 4 in
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 33dcc576c4b73515bb24548c832f4bfbdf8595ce
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

And 0 in
Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 7 Commit Notification 2024-06-14 21:57:02 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7e123665eb8afb9b46422e28ade5bb512fafe12c

tdf#68034: sc_goal_seek: Add unittest

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2024-06-17 10:47:06 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/970762307a4d65ea746a3b00628af48f2a80046f

tdf#68034: set the variable cell to value temporarily if needed

It will be available in 24.8.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2024-06-17 22:08:06 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/18d2004f34baa15b86d167836e6f04ecbba4dbc3

tdf#68034: sc_goal_seek: Add unittest

It will be available in 24.8.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.