Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mcertini
 
Posts: n/a
Default Splitting Character String


am trying to separate out the contents of a single cell within Excel
into multiple cells. The text contents within the cell have been input
in a columnar format within the cell. I have tried a number of similar
solutions that I have found on this site but nothing is working. The
following is an example of the two types of text I am trying to
separate out. Each entry within the cell was stacked above each other
with a return. Not all cells within the spreadsheet are going to have
the same product number length.

In Cell A1

30092-08/16
30093-08/16
60236-08/16
60237-08/16

In Cell B1

Net Timer, Hip Stem, Concensus, TI, Sz 08/16
Net Forging, Hip Stem, Consensus, CoCr, Sz 08/16
Overlay, 5x Scal, Net Forging, Hip Stem,
Consensus, Ti, Sz 08/16


--
mcertini
------------------------------------------------------------------------
mcertini's Profile: http://www.excelforum.com/member.php...o&userid=27151
View this thread: http://www.excelforum.com/showthread...hreadid=466632

  #2   Report Post  
KL
 
Posts: n/a
Default

Hi mcertini,

If your first stacked value is in [A1] then introduce the following ARRAY
formula (confirm with Ctrl+Shift+Enter, not just Enter) in [B1] and copy to
the right and downwards:

=INDEX(MID($A1,1+LARGE((MID($A1&CHAR(10),ROW(INDIR ECT("1:"&LEN($A1)+1)),1)=CHAR(10))*ROW(INDIRECT("1 :"&LEN($A1)+1)),1+ROW(INDIRECT("1:"&LEN($A1)-LEN(SUBSTITUTE($A1,CHAR(10),""))+1))),LARGE((MID($ A1&CHAR(10),ROW(INDIRECT("1:"&LEN($A1)+1)),1)=CHAR (10))*ROW(INDIRECT("1:"&LEN($A1)+1)),ROW(INDIRECT( "1:"&LEN($A1)-LEN(SUBSTITUTE($A1,CHAR(10),""))+1)))-LARGE((MID($A1&CHAR(10),ROW(INDIRECT("1:"&LEN($A1) +1)),1)=CHAR(10))*ROW(INDIRECT("1:"&LEN($A1)+1)),1 +ROW(INDIRECT("1:"&LEN($A1)-LEN(SUBSTITUTE($A1,CHAR(10),""))+1)))-1),1+LEN($A1)-LEN(SUBSTITUTE($A1,CHAR(10),""))-(COLUMN()-COLUMN($B:$B)))

Regards,
KL


"mcertini" wrote in
message ...

am trying to separate out the contents of a single cell within Excel
into multiple cells. The text contents within the cell have been input
in a columnar format within the cell. I have tried a number of similar
solutions that I have found on this site but nothing is working. The
following is an example of the two types of text I am trying to
separate out. Each entry within the cell was stacked above each other
with a return. Not all cells within the spreadsheet are going to have
the same product number length.

In Cell A1

30092-08/16
30093-08/16
60236-08/16
60237-08/16

In Cell B1

Net Timer, Hip Stem, Concensus, TI, Sz 08/16
Net Forging, Hip Stem, Consensus, CoCr, Sz 08/16
Overlay, 5x Scal, Net Forging, Hip Stem,
Consensus, Ti, Sz 08/16


--
mcertini
------------------------------------------------------------------------
mcertini's Profile:
http://www.excelforum.com/member.php...o&userid=27151
View this thread: http://www.excelforum.com/showthread...hreadid=466632



  #3   Report Post  
Stefi
 
Posts: n/a
Default

I suppose that the entries are stacked above each other with a CHR(10)
(Alt-Enter).
I suggest first to replace CHR(10) characters to a non used character, e.g.
semicolon with the following one line macro:

Sub replchr10()
Cells.Replace What:=Chr(10), Replacement:=";", LookAt:=xlPart,
SearchOrder _
:=xlByRows, MatchCase:=False
End Sub

Then apply Data-Text to columns with a ; as separator.

Regards,
Stefi


€˛mcertini€¯ ezt Ć*rta:


am trying to separate out the contents of a single cell within Excel
into multiple cells. The text contents within the cell have been input
in a columnar format within the cell. I have tried a number of similar
solutions that I have found on this site but nothing is working. The
following is an example of the two types of text I am trying to
separate out. Each entry within the cell was stacked above each other
with a return. Not all cells within the spreadsheet are going to have
the same product number length.

In Cell A1

30092-08/16
30093-08/16
60236-08/16
60237-08/16

In Cell B1

Net Timer, Hip Stem, Concensus, TI, Sz 08/16
Net Forging, Hip Stem, Consensus, CoCr, Sz 08/16
Overlay, 5x Scal, Net Forging, Hip Stem,
Consensus, Ti, Sz 08/16


--
mcertini
------------------------------------------------------------------------
mcertini's Profile: http://www.excelforum.com/member.php...o&userid=27151
View this thread: http://www.excelforum.com/showthread...hreadid=466632


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
Setting character attributes in a text string Greg Neill Excel Worksheet Functions 1 June 15th 05 08:47 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 09:56 PM
want to remove all text characters equal to one character in length from text string [email protected] Excel Worksheet Functions 1 April 18th 05 12:25 AM
Want to input one character to cause related string to display in. Peace of Christ be with you Excel Worksheet Functions 6 February 20th 05 06:33 AM
Find nth instance of a character in a string Francis Hayes (The Excel Addict) Excel Discussion (Misc queries) 7 January 21st 05 03:44 PM


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

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"