Search-and-add in Calc

classic Classic list List threaded Threaded
3 messages Options
Eddie-2 Eddie-2
Reply | Threaded
Open this post in threaded view
|

Search-and-add in Calc

Hi, I have a number of spreadsheets in which one column contains text;
each cell has different contents. I would like to be able to select
regions in this column and add a semi-colon to the end of each selected
cell, without disturbing the rest of the contents.

Can this be done?

Thanks.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Brian Barker Brian Barker
Reply | Threaded
Open this post in threaded view
|

Re: Search-and-add in Calc

At 22:41 01/01/2018 -0500, Eddie Noname wrote:
>I have a number of spreadsheets in which one column contains text;
>each cell has different contents. I would like to be able to select
>regions in this column and add a semi-colon to the end of each
>selected cell, without disturbing the rest of the contents. Can this be done?

Yup. Search for .* (that's dot-asterisk) and replace with &; (that's
ampersand-semicolon). In the Find & Replace panel, click More Options
and ensure that both "Current selection only" and "Regular
expressions" are ticked. Click Replace All.

How does it work? In the "Search for" box, the dot matches any
character and the asterisk extends this to match zero or more of such
characters - in other words, all the text you have in any cell. In
the "Replace with" box, the ampersand represents the original matched
string and the semicolon is the character you want added.

I trust this helps.

Brian Barker


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Eddie-2 Eddie-2
Reply | Threaded
Open this post in threaded view
|

Re: Search-and-add in Calc

Thank you, Brian. That works perfectly!

On Tue, 02 Jan 2018 04:35:46 +0000
Brian Barker <[hidden email]> wrote:

> At 22:41 01/01/2018 -0500, Eddie Noname wrote:
> >I have a number of spreadsheets in which one column contains text;
> >each cell has different contents. I would like to be able to select
> >regions in this column and add a semi-colon to the end of each
> >selected cell, without disturbing the rest of the contents. Can this
> >be done?  
>
> Yup. Search for .* (that's dot-asterisk) and replace with &; (that's
> ampersand-semicolon). In the Find & Replace panel, click More Options
> and ensure that both "Current selection only" and "Regular
> expressions" are ticked. Click Replace All.
>
> How does it work? In the "Search for" box, the dot matches any
> character and the asterisk extends this to match zero or more of such
> characters - in other words, all the text you have in any cell. In
> the "Replace with" box, the ampersand represents the original matched
> string and the semicolon is the character you want added.
>
> I trust this helps.
>
> Brian Barker
>
>


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted