Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to insert a space
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to insert a space between display results | Excel Worksheet Functions | |||
Insert Space | Excel Discussion (Misc queries) | |||
How do I insert space between 2 consecutive columns of an XL Shee. | Excel Discussion (Misc queries) | |||
insert a space in a phone #. change (123)456-7890 to (123) 456-78 | Excel Worksheet Functions | |||
How can I insert a space before the last character in a range of cells | Excel Programming |