Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How can I split contents of cell with no delimiter

Hi,

I have a column of text

ny17
ca13
ky04

I want to be able to split the text and numbers into two separate columns,
"ny" in one, "17" in another. As you can see there's no delimiter. Since I
know excel can recognize the difference between text and a number I know
there's a way to do it but I don't know what it is.

Alternatively, I would be happy to find a way to insert a delimiter like a
comma between the text and number to use "text to columns".

Can anyone help?
Thanks,
Rebecca
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: How can I split contents of cell with no delimiter

Hi Rebecca,

You can use a combination of the LEFT and RIGHT functions to split the text and numbers into two separate columns.

Here are the steps:
  1. Insert two new columns next to the column with the text and numbers you want to split.
  2. In the first new column, use the LEFT function to extract the text from the original column. The formula would be:
    Formula:
    =LEFT(A1,2
    if the original text is in cell A1. This will extract the first two characters from the cell.
  3. In the second new column, use the RIGHT function to extract the numbers from the original column. The formula would be:
    Formula:
    =RIGHT(A1,2
    if the original text is in cell A1. This will extract the last two characters from the cell.
  4. Copy the formulas down to the rest of the rows in the new columns.

Alternatively, if you prefer to insert a delimiter like a comma between the text and number, you can use the SUBSTITUTE function to replace the characters in the original column with a comma. Here are the steps:
  1. Insert a new column next to the column with the text and numbers you want to split.
  2. In the new column, use the SUBSTITUTE function to replace the characters in the original column with a comma. The formula would be:
    Formula:
    =SUBSTITUTE(A1,LEFT(A1,LEN(A1)-2),"")&","&RIGHT(A1,2
    if the original text is in cell A1. This will replace the first two characters in the cell with nothing, add a comma, and then add the last two characters.
  3. Use "text to columns" to split the new column using the comma as the delimiter.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default How can I split contents of cell with no delimiter

You show two letters and two numbers. for these:

=LEFT(A1,2)
and
=RIGHT(A1,2)
--
Gary''s Student - gsnu200738


"rebc" wrote:

Hi,

I have a column of text

ny17
ca13
ky04

I want to be able to split the text and numbers into two separate columns,
"ny" in one, "17" in another. As you can see there's no delimiter. Since I
know excel can recognize the difference between text and a number I know
there's a way to do it but I don't know what it is.

Alternatively, I would be happy to find a way to insert a delimiter like a
comma between the text and number to use "text to columns".

Can anyone help?
Thanks,
Rebecca

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How can I split contents of cell with no delimiter

If the text is always 2 characters, you can still use Data|text to columns. But
choose fixed width--not delimited.



rebc wrote:

Hi,

I have a column of text

ny17
ca13
ky04

I want to be able to split the text and numbers into two separate columns,
"ny" in one, "17" in another. As you can see there's no delimiter. Since I
know excel can recognize the difference between text and a number I know
there's a way to do it but I don't know what it is.

Alternatively, I would be happy to find a way to insert a delimiter like a
comma between the text and number to use "text to columns".

Can anyone help?
Thanks,
Rebecca


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How can I split contents of cell with no delimiter

Well, that was embarrassingly easy. Thanks for making my day! :)

RC

"Gary''s Student" wrote:

You show two letters and two numbers. for these:

=LEFT(A1,2)
and
=RIGHT(A1,2)
--
Gary''s Student - gsnu200738


"rebc" wrote:

Hi,

I have a column of text

ny17
ca13
ky04

I want to be able to split the text and numbers into two separate columns,
"ny" in one, "17" in another. As you can see there's no delimiter. Since I
know excel can recognize the difference between text and a number I know
there's a way to do it but I don't know what it is.

Alternatively, I would be happy to find a way to insert a delimiter like a
comma between the text and number to use "text to columns".

Can anyone help?
Thanks,
Rebecca



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How can I split contents of cell with no delimiter

that was even easier! thanks to everyone!

"Dave Peterson" wrote:

If the text is always 2 characters, you can still use Data|text to columns. But
choose fixed width--not delimited.



rebc wrote:

Hi,

I have a column of text

ny17
ca13
ky04

I want to be able to split the text and numbers into two separate columns,
"ny" in one, "17" in another. As you can see there's no delimiter. Since I
know excel can recognize the difference between text and a number I know
there's a way to do it but I don't know what it is.

Alternatively, I would be happy to find a way to insert a delimiter like a
comma between the text and number to use "text to columns".

Can anyone help?
Thanks,
Rebecca


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Split text into multiple columns using a common delimiter buffgirl71 Excel Discussion (Misc queries) 4 May 21st 23 07:43 PM
Excel 2000 - Split Contents of Cell Across Multiple Cells DeeW Excel Discussion (Misc queries) 7 November 8th 06 09:10 PM
Split contents of a cell Rikuk Excel Worksheet Functions 5 March 26th 06 04:03 PM
Can unmerged cell contents be split to another cell Karyn Excel Worksheet Functions 1 January 12th 06 08:07 PM
How to split the contents of a cell between two cells. Colin Hayes Excel Worksheet Functions 4 June 11th 05 01:21 AM


All times are GMT +1. The time now is 02:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"