[Solved] Find/replace single quotes in Calc cell's

Discuss the spreadsheet application
Post Reply
cornouws
Posts: 44
Joined: Mon Jan 14, 2008 10:43 pm

[Solved] Find/replace single quotes in Calc cell's

Post by cornouws »

Hi *,

I'm facing the challenge to replace a single quote (') that is in a Calc cell. (This also is the "character" that is used to mark cell contents as text.)
Tried everything I could reasonably think of, with and without regular expressions. Couldn't find anything.

Does anyone have a clue?

Thanks,
Cor
Last edited by Hagar Delest on Tue Jun 10, 2008 3:54 pm, edited 2 times in total.
Reason: tagged the thread as Solved.
The most recent LibreOffice and OpenOffice.org on Ubuntu - sometimes on Windows XP
User avatar
Hagar Delest
Moderator
Posts: 32658
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Find/replace single quotes in Calc cell's

Post by Hagar Delest »

Do you mean a quote before a number ? Replace by what ? Can you give an example ? Note that you can attach files here.
Could that post help : Re: Sorting data numerically by fst ?
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
JohnV
Volunteer
Posts: 1585
Joined: Mon Oct 08, 2007 1:32 am
Location: Kentucky, USA

Re: Find/replace single quotes in Calc cell's

Post by JohnV »

For the text identifier, search for
^.
and replace with
&

Regular Expressions must be checked.
cornouws
Posts: 44
Joined: Mon Jan 14, 2008 10:43 pm

Re: Find/replace single quotes in Calc cell's

Post by cornouws »

Hi Hagar & John,

Both your solutions work.
My experience with reg expr. was clearly not enough - thanks for the help.
Cor
The most recent LibreOffice and OpenOffice.org on Ubuntu - sometimes on Windows XP
User avatar
probe1
Volunteer
Posts: 277
Joined: Mon Oct 08, 2007 1:34 am
Location: Chonburi Thailand

Re: [Solved] Find/replace single quotes in Calc cell's

Post by probe1 »

if you have to do this over and over again....use this macro:
Txt2Num
Removes leading apostrophes from the selected cells to reset the format from "text” to "standard numbering”
Cheers
Winfried

DateTime2 extension: insert date, time or timestamp, formatted to your needs
Post Reply