Bug 93510 - Automatically find column and row labels may determine a row label instead of column label.
Summary: Automatically find column and row labels may determine a row label instead of...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Find-Search
  Show dependency treegraph
Reported: 2015-08-18 12:18 UTC by tagezi
Modified: 2021-11-17 07:20 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:

for example (16.00 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-08-18 12:18 UTC, tagezi

Note You need to log in before you can comment on or make changes to this bug.
Description tagezi 2015-08-18 12:18:56 UTC
Created attachment 117996 [details]
for example

OS: Kubuntu 14.04 (64 bit)

If a table have column of words, and I use the function SUMIFS with regular expressions in the function parameter "Criteria", the function return 0 independently from values in the sum range.

If range contains merged cells in the label or a empty cell right after the label, this bug do not appear.
I think that Calc cannot solve precedence of labels.

I attached the file with example.
Comment 1 Jacques Guilleron 2015-08-18 14:39:01 UTC
Hi Lera,

With your spreadsheet, when I split in Workaround the two first cells in heading, delete the second line, delete and introduce again the formula in B11, I reproduce with
LO Build ID: 8a35821d8636a03b8bf4e15b48f59794652c68ba
LO Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
OS: Windows 7 Home Premium
Comment 2 tagezi 2015-08-19 08:01:09 UTC
I made a mistake in the description of the bug.
SUMIFS must be read as SUMIF.

SUMIFS have it bug too. But it returns err:502.
If the range contains merged cells in the label or an empty cell right after the label, this bug do not appear, too.

I am very sorry for this mistake.
Do I have to divide these bug report?
Comment 3 QA Administrators 2016-09-20 10:26:05 UTC Comment hidden (obsolete)
Comment 4 Eike Rathke 2020-01-14 00:59:54 UTC
Regular expressions are not the culprit here, adjusting summary. The problem is that in B11
the 'Product' auto-label name from A1 is compiled as a row label instead of column label, the resulting reference is B1, which of course does not match.

In ScCompiler::IsColRowName() near the end the distinction is made whether another string cell is below or above the label cell, usually labels are used with numeric data if in columns. An additional check whether the label is actually the top or bottom of a filled cell range would indicate a more likely column label, but not solve this case of a corner cell.

Those auto-labels should be deprecated anyway as they may fail in other ways when data varies, the proper solution is to use defined labels instead.
Sheet -> Named Ranges and Expressions -> Labels...
Comment 5 Roseheeler 2020-09-01 05:00:07 UTC Comment hidden (spam)
Comment 6 johnny smith 2021-02-24 03:14:25 UTC Comment hidden (spam)
Comment 7 Purecannabisoffers 2021-05-31 02:08:35 UTC Comment hidden (spam)
Comment 8 William Sonalford 2021-11-17 07:20:41 UTC Comment hidden (spam)