Bug 160255 - Named Ranges Should Be Able to be Used in Conditional Formatting Dialog Box
Summary: Named Ranges Should Be Able to be Used in Conditional Formatting Dialog Box
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.3.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/calc-ho...
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: Conditional-Formatting Cell-Name
  Show dependency treegraph
 
Reported: 2024-03-18 06:35 UTC by BillMal
Modified: 2024-04-23 10:34 UTC (History)
4 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 BillMal 2024-03-18 06:35:50 UTC
Description:
Create a series of named ranges, say seven cells each corresponding to days of a week and give each named range a name. The first is say, 'fooblock1' and enumerate from there up to 'fooblock7'. Now, based upon the value of each cell in 'fooblock1', you want to apply conditional formatting to the block. As the Conditional Formatting block is written, in the Cell Range section's Range field, you can only enter a cell or range of cells (e.g. C7:C14). 

What would save a lot of time is to list 'fooblock1' in the Range field. Then for each series of named cells (i.g. fooblock2 .. fooblock7) you would enter the named range each time, set the formatting and you are all set.

This use case is applicable to project management with having various cells change color based upon a date value or weekly block over a milestone's timeline. Setting individual cell ranges that appear just as the Range inside of the Manage Conditional Formatting dialog box Conditional Formats field is difficult to parse with a long list. Having the named ranges instead ensures completeness and ease of management. So, seeing something like this:

Range      First Condition
fooblock1  Formula is {formula 1}
fooblock2  Formula is {formula 2}
fooblock3  Formula is {formula 3}
fooblock4  Formula is {formula 4}
fooblock5  Formula is {formula 5}
fooblock6  Formula is {formula 6}
fooblock7  Formula is {formula 7}
...
fooblock13 Formula is {formula 13}

Instead of
Range      First Condition
C7:C14     Formula is {formula 1}
C16:C23    Formula is {formula 2}
C25:C32    Formula is {formula 3}
...
C104:C111  Formula is (formula 13}

Steps to Reproduce:
1. Create a Named Range
2. Select the range
3. Create a new Conditional Formatting -> Manage -> Add -> Condition 1 -> change to "Formula is"
4. Cell Range -> enter the text string for the named range
5. Observe the Range field turns red and the OK button is grayed-out

Actual Results:
What I would prefer is in this field, to accept beyond a cell range, is to be able to enter the named range value, or a combination of cell ranges and named ranges
c3:c7,JAN24,NAMED_RANGE2,c250:c252
-or-
NAMED_RANGE2,JAN24
-or-
c3:c7,c250:c252 -> which is what is currently permitted.

Expected Results:
To be able to permit entering the a named range instead of a cell range


Reproducible: Always


User Profile Reset: No

Additional Info:
Permitted the named range value along with or instead of a cell range.
Comment 1 m_a_riosv 2024-03-18 12:19:06 UTC
Looks nice.
Comment 2 Stéphane Guillou (stragu) 2024-03-18 12:44:14 UTC
Thanks for the suggestion.
I guess this is an issue that applies to various features that make sure of a range picker; e.g. see bug 66250 for the Chart equivalent of this request.

Eike, is there any reason why this shouldn't work?
Comment 3 BillMal 2024-03-18 16:55:01 UTC
You are welcome. Thank you both for your comments and also the Chart equivalent bug link. Given that premise, to be complete, I would expect Calc to recognize an underlying geometry change of a named range and reflect that within any utilized range pickers: Chart, Conditional Formatting, etc. Otherwise, one would necessitate manually changing the range everywhere it is referenced, outside of formulas where named ranges work fine in my experience. Appreciate the support.
Comment 4 Heiko Tietze 2024-04-23 10:34:07 UTC
Would be nice but requires cross-platform and -application support. In other words it needs to be defined in the file format.