![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
I want to break down a line of text(of amino acids from a protein) so only one character goes into each cell and the characters fill down a column. I'll give a simple example below, but often the line of text will be ~300 characters in length.
Starting with the following line of text ARNDCQE output should be. A R N D C Q E Is this possible? Thanks in advance. |
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Posts: 202
|
i'd use text to columns (data menu)to separate the sequence letters into separate rows (fixed width option), then do a copy>paste special>transpose to change to columns.
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Perth Australia
Posts: 1,567
|
Hi
Here's another way by formula: Put your sequence in B1 Put this formula in A1 and scroll down =MID($B$1,ROW(),1) Regards Derek |
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
Thanks to both of you.
I ran into problems with the text to columns in that I had to pick the size of each column it would be too time comsuming for a 300+ character text. Derek, your formula worked Great!! Problem solved! Thanks a million.. |
|
|
|
#5 | |
|
Board Regular
Join Date: Feb 2002
Posts: 202
|
Quote:
|
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Location: Perth Australia
Posts: 1,567
|
Hi
Another interesting thing about this formula is that if in A2 you add &A1 to the formula =(MID($B$1,ROW(),1))&A1 when you scroll this down it eventually reverses the original text in B1. have fun Derek |
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
|
Here's what I was going to do, but of course you see my signature.
Put the ARNDCQE text into Word. Select it all, but just the text, not the paragraph return at the end. Hit ctrl-h (find/replace dialog) and put: ^? in the find what box and ^&^p in the replace with box Hit Replace all. Select it all, but only one paragraph return at the end. Hit Table-Convert Text to Table. Tell it you want to use paragraph returns. Tell it you want one column. Ok. Copy the new table into Excel.
__________________
~Anne Troy |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|