Conditional formatting text color depending on text itself

Started by michaelj1103, May 19, 2022, 06:21:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

michaelj1103

I was wondering if it was possible for format the character color based off of the actual text itself? So for example, if the text contained the characters 123, then it would change all the characters red. So the text ABC123 would look like that. And if 123 was not in the text then it would just be Black. Thanks.

Surrogate

#1
Quote from: michaelj1103 on May 19, 2022, 06:21:57 PMI was wondering if it was possible for format the character color based off of the actual text itself? So for example, if the text contained the characters 123, then it would change all the characters red. So the text ABC123 would look like that. And if 123 was not in the text then it would just be Black.
If I understand the condition correctly: if the length of the text sequence is more than 3 characters and the last three characters are 123, then the font is red (value 2). In all other cases the font is black (value 0).

You must activate Developer mode, and open ShapeSheet environment window (hope this video can helps, just see first minute).
In ShapeSheet window scroll and find Character section.

Write formula [tt]IF(AND(STRSAME(RIGHT(SHAPETEXT(TheText),3),"123"),LEN(SHAPETEXT(TheText))>3),2,0)[/tt] in cell Color in Character section.


michaelj1103