You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Remove text, keep the numbers in Numbers

how do I remove the text that is included in a cell for number, for example 102030-09 aaa, i want to remove the aaa but retain the rest of the data

Mac mini 2018 or later

Posted on Aug 14, 2019 8:33 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 14, 2019 10:40 PM

Here's an example that would work for the sample value in your first post, seen in row 2. It depends on a key available in that example:

Note particularly the examples in the last three rows.


B5 uses a dash to separate the 'number part' from the 'letter part' This one would be quite difficult to get right, as it also uses the same character to separate sections of the 'number' part, which should be retained.


B6 contains a character that is not a number or a dash within what appears to be the 'number' part to be retained.


B7 is an empty cell, which returns an error. This is relatively easy to avoid if that needs to be done.


The formula entered in C2 and filled down to the end of column C is this:


C2: LEFT(B2,FIND(" ",B2)−1)


Regards,

Barry


[EDIT]: replaced example with one exhibiting more variety of possible 'numbers'

B.

7 replies
Question marked as Top-ranking reply

Aug 14, 2019 10:40 PM in response to ArchAngel79

Here's an example that would work for the sample value in your first post, seen in row 2. It depends on a key available in that example:

Note particularly the examples in the last three rows.


B5 uses a dash to separate the 'number part' from the 'letter part' This one would be quite difficult to get right, as it also uses the same character to separate sections of the 'number' part, which should be retained.


B6 contains a character that is not a number or a dash within what appears to be the 'number' part to be retained.


B7 is an empty cell, which returns an error. This is relatively easy to avoid if that needs to be done.


The formula entered in C2 and filled down to the end of column C is this:


C2: LEFT(B2,FIND(" ",B2)−1)


Regards,

Barry


[EDIT]: replaced example with one exhibiting more variety of possible 'numbers'

B.

Aug 14, 2019 9:13 PM in response to ArchAngel79

As far as Numbers is concerned, that whole string is 'text'. As soon as you include any text (' aaa') in a string of characters, it cseases being a 'umber' and becomes a text value.


The firsr part of your example, '102030-09' could be read by Numbers as a subtraction expression involving two numbers, and resulting in the number 102021, or as a text string, keeping all nine characters.


Do all of your strings have the same pattern?


Some possible patterns exhibited by the single example are

  • 'six digits, dash, two digits, space, three letters"
  • 'some digits, dash, some digits, space, three letters"
  • 'nine characters-all digits or all but one digits, space, three letters'
  • 'some characters, space, three letters'
  • 'six digits, dash, two digits, space, some letters"
  • 'some digits, dash, some digits, space, some letters"
  • 'nine characters-all digits or all but one digits, space, some letters'
  • 'some characters, space, some letters'


All can be handled, providing there is a single describable pattern to be found. (Each of the descriptions above applies to a 'describable pattern,' but combinations requiring more than one of those patterns do not fit that description.


Can you provide further examples that would help establish such a pattern?


Regards,

Barry


Aug 14, 2019 10:02 PM in response to ArchAngel79

Your first example shows a space between the 'number' part and the text part. Is this space always present? Is there ever a space within the 'number' part?


Is there ever a non-numeric character other than the dash in the number part?


This isn't Twitter. You do not need to limit your post to 140 (or 280) characters. Include enough information to determine a 'hook' that can serve to separate the letters from the numbers.


Regards,

Barry

Remove text, keep the numbers in Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.