View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Faio
 
Posts: n/a
Default Separate 5digits by inserting -

Thanks Biff, Dibben and Rosenfeld.

What you gave has solved this problem in seconds rather than hours.


"Ron Rosenfeld" wrote in message
...
On Thu, 1 Dec 2005 13:59:09 +1200, "Faio" wrote:

I have a column containing codes and I wish to separate the first digit

from
the rest by inserting a hyphen.
E.g 40000 to be 4-0000, 40001 to 4-0001.

Any suggestions rather than going thru a list of more than 1000s?




Are they all 5 digit numbers?

If so:

=TEXT(a1, "0-0000")

and copy/drag down as needed.


--ron