Last active
April 16, 2017 15:55
-
-
Save ateneva/7c9eccee655364ccc77be322ba52e82a to your computer and use it in GitHub Desktop.
Insert spaces between uppercase characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub InsertSpacesBetweenCharactersCase() | |
Dim mStr As String | |
Dim i As Integer | |
Dim Cell As Range | |
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
'written by Angelina Teneva, March 2017 | |
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
For Each Cell In ActiveSheet.Range("G3:G43") | |
mStr = Cell.Value | |
For i = 1 To Len(mStr) | |
Select Case Asc(Mid(mStr, i, 1)) | |
Case 65 To 90: Cell.Value = Left(mStr, i - 1) & Chr(32) | |
End Select | |
Next i | |
Next Cell | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment