hi all,
I've got a set of words (about 10) and a calc spreadsheet. I want to highlight cells in the spreadsheet which contains any of the words in the set.
Is this possible, if so how can I accomplish this task?
Thanks in advance.
[Solved] Highlight cells containing specified words
[Solved] Highlight cells containing specified words
Last edited by Hagar Delest on Sat May 29, 2010 9:04 pm, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
OpenOffice 3.1 on Fedora 12
Re: highlight cells containing specified words
You might want to take a look at Conditional Formatting in Help. I'm not sure if it can handle 10 conditions but it may. Look under the Parameter subheading,callkalpa wrote:hi all,
I've got a set of words (about 10) and a calc spreadsheet. I want to highlight cells in the spreadsheet which contains any of the words in the set.
Is this possible, if so how can I accomplish this task?
Thanks in advance.
LibreOffice 7.3.7. 2; Ubuntu 22.04
Re: highlight cells containing specified words
You can handle any number of words in a conditional expression by using a formula condition, something like this:
ISNUMBER(SEARCH("\<(a|an|the|that|those|these|this)\>";A19))
The text in red is a pattern (or, "regular expression") that matches any of the given words.
If the words can appear anywhere in the cell text, you can use a pattern like this:
.*\<(a|an|the|that|those|these|this)\>.*
Here's an example:
ISNUMBER(SEARCH("\<(a|an|the|that|those|these|this)\>";A19))
The text in red is a pattern (or, "regular expression") that matches any of the given words.
If the words can appear anywhere in the cell text, you can use a pattern like this:
.*\<(a|an|the|that|those|these|this)\>.*
Here's an example:
- Attachments
-
- highlight_words.ods
- (15.11 KiB) Downloaded 446 times
AOO4/LO5 • Linux • Fedora 23
Re: Highlight cells containing specified words [solved]
Thanks and it worked.
OpenOffice 3.1 on Fedora 12