Exported a contact list from Outlook into Excel. Names in column A are in this format SmithBob. A variety of lengths in the names.Is there a method of using a function such as Mid to find the capital letter in the first name and separate the names? If no function, is there a method using VBA? Thanks.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Separating Names (XP)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Separating Names (XP)
- This topic has 10 replies, 4 voices, and was last updated 16 years, 2 months ago.
Viewing 2 reply threadsAuthorReplies-
WSmbarron
AskWoody LoungerFebruary 19, 2009 at 2:48 am #1147886Select the cells you wish to split and then run the following. It will put the characters before the second capital letter in the first column to the right of the selection and from the second capital two columns to the right.
Sub splitIt() Dim strFirst As String, strLast As String Dim cCell As Range, i As Integer For Each cCell In Selection For i = 2 To Len(cCell) If Asc(Mid(cCell, i, 1)) >= 65 And Asc(Mid(cCell, i, 1)) <= 90 Then strLast = Left(cCell, i - 1) strFirst = Mid(cCell, i, 99) cCell.Offset(0, 1) = strLast cCell.Offset(0, 2) = strFirst End If Next Next End Sub
-
WSkiazd
AskWoody Lounger -
WSkiazd
AskWoody Lounger -
WSmbarron
AskWoody LoungerFebruary 19, 2009 at 6:27 pm #1148026(Edited by mbarron on 19-Feb-09 14:27. better explanation of the 99 – I hope)
99 refers to the number of characters following the second capital that should be taken into account.
mind function explained (very briefly)
mid(string,start_character,#_of_character)
It could be changed to:
strFirst = Mid(cCell, i, len(cCell)-i+1)but 99 is much easier to remember.
-
WSkiazd
AskWoody Lounger
-
-
-
-
WSHansV
AskWoody Lounger -
WSkiazd
AskWoody Lounger
-
-
WSfranciz
AskWoody Lounger -
WSkiazd
AskWoody LoungerFebruary 21, 2009 at 4:24 pm #1148349 -
WSfranciz
AskWoody LoungerFebruary 22, 2009 at 4:33 am #1148355I have forgot about absolute references when replying to your post.
try this, confirm by Ctrl,Shift and Enter
=LEFT(A1,MATCH(0,–EXACT(MID(A1,ROW($2:$99),1),MID(LOWER(A1),ROW($2:$99),1)),0))&” “&MID(A1,MATCH(0,–EXACT(MID(A1,ROW($2:$99),1),MID(LOWER(A1),ROW($2:$99),1)),0)+1,LEN(A1))This should return the results you want.
-
-
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Cant log on to oldergeeks.Com (Awaiting moderation)
by
WSJonharnew
2 hours, 58 minutes ago -
Upgrading from Win 10
by
WSjcgc50
4 hours, 47 minutes ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
10 hours, 20 minutes ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
11 hours, 36 minutes ago -
The story of Windows Longhorn
by
Cybertooth
3 hours, 55 minutes ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
13 hours, 35 minutes ago -
Are manuals extinct?
by
Susan Bradley
3 hours, 4 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
22 hours, 43 minutes ago -
Network Issue
by
Casey H
9 hours, 48 minutes ago -
Fedora Linux is now an official WSL distro
by
Alex5723
1 day, 10 hours ago -
May 2025 Office non-Security updates
by
PKCano
1 day, 11 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
1 day, 13 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
13 hours, 57 minutes ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
1 day, 15 hours ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
1 day, 15 hours ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
1 day, 22 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
15 hours, 2 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
2 days, 9 hours ago -
How much I spent on the Mac mini
by
Will Fastie
1 day, 9 hours ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
13 hours, 3 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
2 days, 15 hours ago -
Setting up Windows 11
by
Susan Bradley
1 day, 10 hours ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
2 days, 11 hours ago -
Powershell version?
by
CWBillow
2 days, 12 hours ago -
SendTom Toys
by
CWBillow
23 hours, 3 minutes ago -
Add shortcut to taskbar?
by
CWBillow
2 days, 16 hours ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
3 days, 8 hours ago -
How can I install Skype on Windows 7?
by
Help
3 days, 7 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
2 days, 14 hours ago -
We live in a simulation
by
Alex5723
3 days, 22 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.