A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Splitting text and numbers from a cell



 
 
Thread Tools Display Modes
  #1  
Old November 13th, 2009, 04:13 PM posted to microsoft.public.excel.misc
JimAA
external usenet poster
 
Posts: 27
Default Splitting text and numbers from a cell

Hi,
I'm trying to split a cell that contains a part number and a part
description into a cell that contains the part number and a cell that
contains the part description. There are about 7,000 cells that need to be
separated this way. I tried the text to columns wizard but that is very
labor intensive since some part numbers have spaces and letters in them.
Example:
124 TD45 88 Ceramic Insulators
12 671 6773 Copper Coils
116011 Variable Resistors

I got as far as the formula =MID(A1,1,FIND(" ",A!,1)-1)
but that only returns the first group of letters ("124", "12", "116011") how
can I extract "124 TD45 88", "12 671 6773", and "116011" into their own cells
and "Ceramic Insulators", etc. into their own cells?

Thanks for your help,
Jim
  #2  
Old November 13th, 2009, 04:26 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Splitting text and numbers from a cell

Hi,

This works for your posted examples but relies on wanting to extract the
last 2 words.

For the last 2 words and note I put this in E1

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),199))

For the part No
=SUBSTITUTE(A1,E1,"")
This second formula is dependent on the first

Mike

"JimAA" wrote:

Hi,
I'm trying to split a cell that contains a part number and a part
description into a cell that contains the part number and a cell that
contains the part description. There are about 7,000 cells that need to be
separated this way. I tried the text to columns wizard but that is very
labor intensive since some part numbers have spaces and letters in them.
Example:
124 TD45 88 Ceramic Insulators
12 671 6773 Copper Coils
116011 Variable Resistors

I got as far as the formula =MID(A1,1,FIND(" ",A!,1)-1)
but that only returns the first group of letters ("124", "12", "116011") how
can I extract "124 TD45 88", "12 671 6773", and "116011" into their own cells
and "Ceramic Insulators", etc. into their own cells?

Thanks for your help,
Jim

  #3  
Old November 13th, 2009, 04:46 PM posted to microsoft.public.excel.misc
JimAA
external usenet poster
 
Posts: 27
Default Splitting text and numbers from a cell

Thanks! It worked. But what if I have more than two words in a part
description? i.e., "Ceramic Insulators, Coils and Resistors"

"Mike H" wrote:

Hi,

This works for your posted examples but relies on wanting to extract the
last 2 words.

For the last 2 words and note I put this in E1

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),199))

For the part No
=SUBSTITUTE(A1,E1,"")
This second formula is dependent on the first

Mike

"JimAA" wrote:

Hi,
I'm trying to split a cell that contains a part number and a part
description into a cell that contains the part number and a cell that
contains the part description. There are about 7,000 cells that need to be
separated this way. I tried the text to columns wizard but that is very
labor intensive since some part numbers have spaces and letters in them.
Example:
124 TD45 88 Ceramic Insulators
12 671 6773 Copper Coils
116011 Variable Resistors

I got as far as the formula =MID(A1,1,FIND(" ",A!,1)-1)
but that only returns the first group of letters ("124", "12", "116011") how
can I extract "124 TD45 88", "12 671 6773", and "116011" into their own cells
and "Ceramic Insulators", etc. into their own cells?

Thanks for your help,
Jim

  #4  
Old November 13th, 2009, 05:07 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Splitting text and numbers from a cell

But what if I have more than two words in a part description?

Then it won't work and I don't know how to do it.

Mike

"JimAA" wrote:

Thanks! It worked. But what if I have more than two words in a part
description? i.e., "Ceramic Insulators, Coils and Resistors"

"Mike H" wrote:

Hi,

This works for your posted examples but relies on wanting to extract the
last 2 words.

For the last 2 words and note I put this in E1

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),199))

For the part No
=SUBSTITUTE(A1,E1,"")
This second formula is dependent on the first

Mike

"JimAA" wrote:

Hi,
I'm trying to split a cell that contains a part number and a part
description into a cell that contains the part number and a cell that
contains the part description. There are about 7,000 cells that need to be
separated this way. I tried the text to columns wizard but that is very
labor intensive since some part numbers have spaces and letters in them.
Example:
124 TD45 88 Ceramic Insulators
12 671 6773 Copper Coils
116011 Variable Resistors

I got as far as the formula =MID(A1,1,FIND(" ",A!,1)-1)
but that only returns the first group of letters ("124", "12", "116011") how
can I extract "124 TD45 88", "12 671 6773", and "116011" into their own cells
and "Ceramic Insulators", etc. into their own cells?

Thanks for your help,
Jim

  #5  
Old November 13th, 2009, 07:33 PM posted to microsoft.public.excel.misc
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default Splitting text and numbers from a cell

On Fri, 13 Nov 2009 10:04:05 -0800, JimAA
wrote:

Beautiful! Worked like a charm. Thank you for your help.


Glad to help. Thanks for the feedback.
--ron
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:17 PM.


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