Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Spacing Macro
Hi,
Im looking for a spacing macro that adds spaces based on Capitalization changes. For example if I have : JhonDoeDeer, the macro will move it to another cell as John Doe Deer. If anyone knows of a website that shows a template for a macro like this, please let me know. Or if there is some way to do this with clever excel equations, that would be great too. Thanks again. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Spacing Macro
This worked for me in Excel 2000
Dim str As String, n As Integer, str2 As String str = "AbCdE" str2 = Left(str, 1) For n = 2 To Len(str) If Mid(str, n, 1) = UCase(Mid(str, n, 1)) Then str2 = str2 & " " & Mid(str, n, 1) Else: str2 = str2 & Mid(str, n, 1) End If Next MsgBox str2 -- steveB Remove "AYN" from email to respond "Silent" wrote in message ... Hi, Im looking for a spacing macro that adds spaces based on Capitalization changes. For example if I have : JhonDoeDeer, the macro will move it to another cell as John Doe Deer. If anyone knows of a website that shows a template for a macro like this, please let me know. Or if there is some way to do this with clever excel equations, that would be great too. Thanks again. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
LINE SPACING | Excel Discussion (Misc queries) | |||
Spacing between characters | Excel Discussion (Misc queries) | |||
SPACING | Excel Worksheet Functions | |||
Spacing | Excel Programming | |||
Spacing | Excel Programming |