Thread: Spacing Macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
STEVE BELL STEVE BELL is offline
external usenet poster
 
Posts: 692
Default 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.