https://bugs.documentfoundation.org/show_bug.cgi?id=172813

            Bug ID: 172813
           Summary: Calc shows #REF! after deleting rows containing the
                    referenced last cell; hard recalculation fixes the
                    result
           Product: LibreOffice
           Version: 26.2.1.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
LibreOffice version: 26.2.1.2
File format: ODS file (essentially created from a CSV file)

Description:
Calc shows a #REF! error after deleting rows at the end of a data range,
although the formula reference is updated correctly. A hard recalculation fixes
the result.

Steps to reproduce:

Create a column of consecutive dates in cells B4 (for example, from 27 March
2026 to 31 May 2026).
Enter the formula =B69-B4 in another cell. The result is correct (65).
Delete rows 39 to 69, so that the remaining date range is B4.
The formula is automatically adjusted to =B38-B4.
The result cell shows #REF! instead of the expected value (34).

Additional observations:

The formula displayed in the input line is correct: =B38-B4.
Both referenced cells (B4 and B38) contain valid numeric date values.
Entering the same formula again in another cell gives the correct result (34).
Pressing Ctrl+Shift+F9 (hard recalculation) immediately fixes the error and the
correct result 34 is displayed.
Deleting rows in the middle of the range does not cause the problem; it only
occurs when deleting the rows containing the previous last referenced cell.

Expected behavior:
After deleting the rows, Calc should update the formula reference and calculate
the correct result automatically.

Actual behavior:
The formula reference is updated, but the displayed result remains #REF! until
a hard recalculation is performed.

Steps to Reproduce:
Create a column of consecutive dates in cells B4 (for example, from 27 March
2026 to 31 May 2026).
Enter the formula =B69-B4 in another cell. The result is correct (65).
Delete rows 39 to 69, so that the remaining date range is B4.
The formula is automatically adjusted to =B38-B4.
The result cell shows #REF! instead of the expected value (34)

Actual Results:
#REF!

Expected Results:
see above
Workaround:
Press Ctrl+Shift+F9


Reproducible: Always


User Profile Reset: No

Additional Info:
The formula displayed in the input line is correct: =B38-B4.
Both referenced cells (B4 and B38) contain valid numeric date values.
Entering the same formula again in another cell gives the correct result (34).
Pressing Ctrl+Shift+F9 (hard recalculation) immediately fixes the error and the
correct result 34 is displayed.
Deleting rows in the middle of the range does not cause the problem; it only
occurs when deleting the rows containing the previous last referenced cell.

Workaround: Press Ctrl+Shift+F9
Expected behavior:
After deleting the rows, Calc should update the formula reference and calculate
the correct result automatically.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to