Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Need insert a dash in between last 4 digits in text string
I have a column (TractID) that has a 10 character text string, like the
following entry: 0190003164. First, I need to grab the last four digits (3164) of the entry, copy them to the next column (PropertyID), then insert a dash (-) between the 3rd to last (from the R) and the 2nd to last characters. The data in the column will always be the same format, if that helps. How do I do this? |
#2
|
|||
|
|||
If the text is in A1 then enter the following formula in B1
=Mid(A1,7,2) & "-" & Mid(A1,9,2) Alok "Phil" wrote: I have a column (TractID) that has a 10 character text string, like the following entry: 0190003164. First, I need to grab the last four digits (3164) of the entry, copy them to the next column (PropertyID), then insert a dash (-) between the 3rd to last (from the R) and the 2nd to last characters. The data in the column will always be the same format, if that helps. How do I do this? |
#3
|
|||
|
|||
One way:
=MID(A1,7,2) & "-" & RIGHT(A1,2) another: =TEXT(RIGHT(A1,4),"00-00") In article , "Phil" wrote: I have a column (TractID) that has a 10 character text string, like the following entry: 0190003164. First, I need to grab the last four digits (3164) of the entry, copy them to the next column (PropertyID), then insert a dash (-) between the 3rd to last (from the R) and the 2nd to last characters. The data in the column will always be the same format, if that helps. How do I do this? |
#4
|
|||
|
|||
Thanks. It worked great.
"Alok" wrote: If the text is in A1 then enter the following formula in B1 =Mid(A1,7,2) & "-" & Mid(A1,9,2) Alok "Phil" wrote: I have a column (TractID) that has a 10 character text string, like the following entry: 0190003164. First, I need to grab the last four digits (3164) of the entry, copy them to the next column (PropertyID), then insert a dash (-) between the 3rd to last (from the R) and the 2nd to last characters. The data in the column will always be the same format, if that helps. How do I do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
insert a JPEG into EXCEL 2002 | Excel Discussion (Misc queries) | |||
insert picture | Excel Discussion (Misc queries) | |||
Insert Line Macro | Excel Discussion (Misc queries) | |||
How to insert a repeating dash in phone numbers without dashes in. | New Users to Excel | |||
Challenging Charting | Charts and Charting in Excel |