Thread: Format Text
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Format Text

Why a macro...Here is a formula to do it...

=LEFT(A1, 1) &"-" & MID(A1, 2, 3) &"-" & MID(A1, 5, 2) &"-" & MID(A1, 7, 2)

With your text in cell A1
--
HTH...

Jim Thomlinson


"Tazflerts" wrote:

How can i format text by macro for K1234567 to K-123-45-67


Thanks,
Kevin