How do I split the contents of a cell in Numbers?

I have a column of cells in a Numbers spreadsheet that contains city and state information. If that information had been entered consistently, I could use the RIGHT function to pull out the state. However, some cells have, for example, Greenville, SC, while others have Greenville, South Carolina.


In Excel, I can split the contents using a Text to Columns function built into Excel. Is there a way to do that in Numbers (most recent version)? If there is nothing built into Numbers, could I use a regular expression (GREP) in Numbers to do that? How?

MacBook Pro (15-inch, 2017), iOS 11.3, TB, Core i7, 3.1GHz, 16GB, 1TB

Posted on May 12, 2018 4:58 AM

Reply
Question marked as Top-ranking reply

Posted on May 12, 2018 1:00 PM

Hi Allen,


Assuming that all of the cells in Column A have City, State, this may work for you.

User uploaded file

Formula in B2 (and Fill Down)

=FIND(",",A2)


Formula in C2 (and Fill Down)

=LEFT(A2,B2−1)

The -1 is to allow for the space after the city name.


Formula in D2 (and Fill Down)

=RIGHT(A2,LEN(A2)−B2−1)


Please call back with questions.

Regards,

Ian.

8 replies
Question marked as Top-ranking reply

May 12, 2018 1:00 PM in response to allenkenya

Hi Allen,


Assuming that all of the cells in Column A have City, State, this may work for you.

User uploaded file

Formula in B2 (and Fill Down)

=FIND(",",A2)


Formula in C2 (and Fill Down)

=LEFT(A2,B2−1)

The -1 is to allow for the space after the city name.


Formula in D2 (and Fill Down)

=RIGHT(A2,LEN(A2)−B2−1)


Please call back with questions.

Regards,

Ian.

May 12, 2018 7:42 PM in response to allenkenya

allenkenya wrote:



In Excel, I can split the contents using a Text to Columns function built into Excel. Is there a way to do that in Numbers (most recent version)?


In Numbers you can do something very similar using this Text to Columns Automator Service (Dropbox download).


To install (this takes less than a minute) double-click the downloaded .workflow package and give permission at System Preferences > Security & Privacy. Also make sure Automator.app is listed and checked at System Preferences > Security & Privacy > Privacy > Accessibility.


To use:


  1. select the cells you want to split
  2. choose Text to Columns from the Numbers > Services menu.
  3. answer the prompts
  4. click once in the top-left cell of the range where you want the results to appear
  5. command-v or Edit > Paste and Match Style to paste.


You'll know within a minute or two whether this does what you want.


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I split the contents of a cell in Numbers?

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