| Edit: Changed subject, was Copy only text from cell Make your post understandable by others -- MrProgrammer, forum moderator |
[Solved] Copy only alphabetic characters from cell
-
TheOldThug
- Posts: 22
- Joined: Fri Jun 12, 2020 3:03 pm
[Solved] Copy only alphabetic characters from cell
I want a cell equal to another cell but I only want the text copied, no numbers. Is this possible to set up? For example the cell to be copied is Timmy 14. However I only want Timmy copied not the number. Cell A1 has Timmy 14. In cell B1 that I am copying A1 into, I am using =A1. However it then copies name and number, don't want number
Last edited by TheOldThug on Tue Jun 04, 2024 3:33 am, edited 3 times in total.
Open Office 4.1.7 on Windows 10
Re: Copy only text from cell
Can you give an example of what you need to do? Is there any pattern to the text and numbers? Are you working with a word followed by numbers or some other consistent pattern?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
-
TheOldThug
- Posts: 22
- Joined: Fri Jun 12, 2020 3:03 pm
Re: Copy only text from cell
It is a golf scorecard. The cell has Name and handicap, for example Timmy 14. The other side of the scorecard I want only Timmy copied, not the handicap.
Open Office 4.1.7 on Windows 10
Re: Copy only text from cell
Judging from your example, we can pull the text that occurs before the first space. A formula for that is
If the names can have spaces in them, like John Andrew, you can pull the text that ends two positions before the first numeric digit.
For that to work, you have to go to the menu Tools -> Options, expand the OpenOffice Calc list on the left, select Calculate, and select Enable Regular Expressions in Formulas.
If there are cases not covered by those formulas, please provide examples of them.
Code: Select all
=LEFT(A1;SEARCH(" ";A1) - 1)Code: Select all
=LEFT(A3; SEARCH("\d"; A3) - 2)If there are cases not covered by those formulas, please provide examples of them.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Copy only alphabetic characters from cell
For users Of LibreOffice V6.2 or higher and trying to solve similar tasks, I attach an example demonstrating the usage of the REGEX() function for the purpose.
There is some help provided concerning this function and the usage of Regular Expressions generally.
A good tutorial: https://www.regular-expressions.info/
The flavour used By LibO (and AOO where applicable) is the one provided by the ICU.
A good tutorial: https://www.regular-expressions.info/
The flavour used By LibO (and AOO where applicable) is the one provided by the ICU.
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München