How do I replace text in a Calc cell with the same text bolded

I’ve looked carefully at the Find/Replace dialog and can’t see how I can find some text and replace it with the bolded equivalent. If I use a regular expression such as (.) and specify the replacement as \1 there appears to be no way of applying bold weight to the replacement. Is this a where macros step in?

-Bruce

The Regex engine coming with LibreOffice (ICU) uses $1 in replacement strings for the insertion of what was found for the first caption group. \1 is treated as a literal.

There actually is no way. Calc has no paragraph styles and no character styles which is one of the reasons for the fact that the F&R dialog in Calc is very different from the version for Witer.

To do it this way is really complicated.
And you will lose the result on any further string manipulation concerning the respective cell. Functions an F&R action always only return strings to the cells.
… …
If you are intertested I can supply a “proof of concept” I made some time ago in pursuit of a different question touchinmg the subject. I only did this for “general interest”. Personally I never use complicated formatting of texts in Calc.

I may be stating the obvious here, but I can’t see “match limits” mentioned, so just in case …

If the target for bolding is always the entire cell, you can use the “find all” button and then apply the formatting to the matched set of cells (by way of direct formatting or a cell style).

If you need to apply said formatting to partial content, I must agree with @Lupp. There is no tool for this in Calc. For some applications you could copy to a Writer table and do the modification there, but as @Lupp already indicated, there are major chances to lose more than you gain.

1 Like