Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
text to columns
I've exported a worksheet that put are customer id # and name in the same
column. Of course our customer id aren't all the same length and some of the names also have a "-" in them. Is there a way to seperate this by the first hyphen only and to disregard the second one? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
text to columns
This formula will display the text to the left of the first dash...
=LEFT(A1,FIND("-",A1&"-")-1) And this formula will return all the text after that first dash... =MID(A1,FIND("-",A1&"-")+1,99) The second formula assumes your entries are not longer than 99 characters. If they could be longer, just change the 99 to 999 instead. Oh, and these formulas can be copied down as needed. -- Rick (MVP - Excel) "bwduncan" wrote in message ... I've exported a worksheet that put are customer id # and name in the same column. Of course our customer id aren't all the same length and some of the names also have a "-" in them. Is there a way to seperate this by the first hyphen only and to disregard the second one? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combining Text from 2 Columns into 1 then Deleting the 2 Columns | Excel Worksheet Functions | |||
help with sorting text in columns to match other columns | Excel Discussion (Misc queries) | |||
merge text from 2 columns into 1 then delete the old 2 columns | Excel Worksheet Functions | |||
Excel is automatically doing "text to columns" upon paste text. | Excel Discussion (Misc queries) | |||
Linking text columns with text and data columns | Excel Worksheet Functions |