Macro to insert a space
Hi
I need a macro to insert a space every 4 characters e.g. It will change the contents of : CY11A01 To CY11 A01 Any ideas?? -- Message posted via http://www.officekb.com |
Macro to insert a space
do you only need to add a space after the first 4 characters?
Sub test2() slen = Len(Range("a1")) Range("b1").Value = Left(Range("a1"), 4) & " " & Right(Range("a1"), slen - 4) End Sub -- Gary "Lame Dame via OfficeKB.com" <u15117@uwe wrote in message news:5db1018f45b69@uwe... Hi I need a macro to insert a space every 4 characters e.g. It will change the contents of : CY11A01 To CY11 A01 Any ideas?? -- Message posted via http://www.officekb.com |
Macro to insert a space
|
All times are GMT +1. The time now is 02:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com