Calc - automatically apply character style to specific characters


I have a column containing words in small letters, each word ending in one capital letter.

image description

I would like to have that one capital character in a different style, eg in red, like in the first cell of the image.

I made that first cell manually, but I have many cells to edit, so I would prefer to automate the process.

Is there a way to automatically change the style of all capital letters in the column, with (conditional) styles or macros or something else?


Calc hasn’t any standard means to do so.
F&R doesn’t return findings INSIDE any cell, but only the cells containing findings. Therefore you cannot do as if you were working in Writer.

A specialized solution by user code, however, isn’t all too complicated. See attached example.
(By editing the example was replaced by a slightly better one.)

Thank you, @Lupp, I’ve got a working solution and an interesting macro to learn from. Tnx!

Paste special (Ctrl+Shift+V) your data as Rich text formatting (RTF) in Writer; this will become a table.

Find All [A-Z], with Regular expressions, and apply style. Then copy and paste in Calc.

image description

Tested with LibreOffice (x86); OS: Windows 6.1.

Add Answer is reserved for solutions. If you think the answer is not satisfactory, add a comment below, or click edit (below your question) to add more information. Thanks.

Check the mark (Answer markCorrect answer mark) to the left of the answer that solves your question.

If the answer helped you, you can mark the up arrow (Upvote mark) that is on the left (to vote, you need to have karma of at least 5).

Thank you, I would never have thought of using writer’s capabilities, so that’s a new trick up my sleeve now.Tnx!