View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jason[_11_] Jason[_11_] is offline
external usenet poster
 
Posts: 17
Default Splitting complex string into 3 numbers with a formula - Please help!

Hi--

I have a string that is a unique ID number in the form XXX-XXX-XXX.
However, the number of digits in each segment of the string varies.
For example, all of the following are valid:
2-5895-223
1213-23-257676
55-1-2

I am trying to write a formula to split the string into three separate
numbers. Using the first example, the three numbers would be:
2
5895
223

I am having trouble writing a formula flexible enough to identify
where the dash is and to split the string in the right place. Any
suggestions?

Thanks,
Jason