Hello all, hoping that someone can tell me if this is possible at all. I have not found a way to do this yet.
This is about conditional formatting, which I do know how to do, but not in the way I want to at the moment.
Here is what I want to do if possible:
I have a worksheet, and cell A1 has a long string of text in it. Let us say that this is the text:
SONIC3_FTR-2_F_EN-XX_US-GB_51-EN_CCAP_2K_ST_20070115_FAC_i3D_OV
If the text contains CCAP I want cell B1 background to turn green, but if it does NOT contain CCAP B1 background should go red or just stay auto, aka white.
I have done a lot of conditional formatting in the past, but never on text in a text string. BTW, there are never any spaces in these text strings.
Ideas appreciated.
[Solved] Conditional formatting on text in a text string
[Solved] Conditional formatting on text in a text string
Last edited by robleyd on Wed Jan 15, 2025 8:13 am, edited 3 times in total.
Reason: Add green tick
Reason: Add green tick
OpenOffice 4.1.15 0n Windows 7
Re: Conditional formatting on text in a text string
Set the condition to Formula Is and use the formula
Code: Select all
ISNUMBER(FIND("CCAP";A1))OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Conditional formatting on text in a text string
There is a discussion on this in this topic.
In summary, use a formula e.g.
In summary, use a formula e.g.
Code: Select all
ISNUMBER(SEARCH("CCAP";A1;1))Slackware 15 (current) 64 bit
Apache OpenOffice 4.1.16
LibreOffice 26.2.3.2; SlackBuild for 26.2.3 by Eric Hameleers
---------------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
Apache OpenOffice 4.1.16
LibreOffice 26.2.3.2; SlackBuild for 26.2.3 by Eric Hameleers
---------------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
Re: Conditional formatting on text in a text string
Wow, that was quick.
That worked great!
Thanks all.
That worked great!
Thanks all.
OpenOffice 4.1.15 0n Windows 7