Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
LINE SPACING MARY Excel Discussion (Misc queries) 1 February 28th 10 03:52 AM
Spacing between characters FJ Excel Discussion (Misc queries) 5 May 23rd 07 02:44 AM
SPACING RAJEEV CHADHA Excel Worksheet Functions 5 April 18th 05 02:11 PM
Spacing Greg[_20_] Excel Programming 8 March 31st 05 04:20 PM
Spacing Hasan Excel Programming 2 June 16th 04 01:08 AM


All times are GMT +1. The time now is 10:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"