ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I separate a text value with dashes? (https://www.excelbanter.com/excel-worksheet-functions/42166-how-do-i-separate-text-value-dashes.html)

Phil

How do I separate a text value with dashes?
 
Hello,

I have a column (called Tract Number) that contains a column with a 11
character number (BTW, it really isn't a number, if that helps), such as this
one: 7-5-029-001. The number will ALWAYS have this format, and will ALWAYS
contain 11 characters.

The first number (7 in this case) is for Township, the second (5) for Range,
the third (029) for Section, and the fourth (001) for Tract.

I have 4 new columns with Township, Range, Section, and Tract to the
immediate right of the Tract Number column. Here is my question:

How can I break up the 11 characters so that they will automatically
populate the appropiate columns?

TIA for your reply.

Ray A

One way
Have a look at DataText to Columns. You test is delimited and the delimiter
is other "-" select your destination cell
HTH


"Phil" wrote:

Hello,

I have a column (called Tract Number) that contains a column with a 11
character number (BTW, it really isn't a number, if that helps), such as this
one: 7-5-029-001. The number will ALWAYS have this format, and will ALWAYS
contain 11 characters.

The first number (7 in this case) is for Township, the second (5) for Range,
the third (029) for Section, and the fourth (001) for Tract.

I have 4 new columns with Township, Range, Section, and Tract to the
immediate right of the Tract Number column. Here is my question:

How can I break up the 11 characters so that they will automatically
populate the appropiate columns?

TIA for your reply.


Chuck Snyder

Assume the number you want to separate is in cell a1 and you want to
separate it into b1, c1, d1 and e1. The following formulas will do it:

in b1, use =left (a1,1)
in c1, use =mid (a1,3,1)
in d1, use =mid (a1,5,3)
in e1, use =right(a1,3)

Fill these columns down and you'll distribute all the numbers in column a
across b, c, d, and e.

Chuck




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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com