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. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
Outdated Laptop
by
jdamkeene
1 hour, 26 minutes ago -
Updating Keepass2Android
by
CBFPD-Chief115
1 hour, 40 minutes ago -
Another big Microsoft layoff
by
Charlie
1 hour, 20 minutes ago -
PowerShell to detect NPU – Testers Needed
by
RetiredGeek
1 hour, 9 minutes ago -
May 2025 updates are out
by
Susan Bradley
1 hour, 44 minutes ago -
Windows 11 Insider Preview build 26200.5600 released to DEV
by
joep517
7 hours, 24 minutes ago -
Windows 11 Insider Preview build 26120.3964 (24H2) released to BETA
by
joep517
7 hours, 25 minutes ago -
Drivers suggested via Windows Update
by
Tex265
7 hours, 16 minutes ago -
Thunderbird release notes for 128 esr have disappeared
by
EricB
5 hours ago -
CISA mutes own website, shifts routine cyber alerts to X, RSS, email
by
Nibbled To Death By Ducks
14 hours, 16 minutes ago -
Apple releases 18.5
by
Susan Bradley
8 hours, 41 minutes ago -
Fedora Linux 40 will go end of life for updates and support on 2025-05-13.
by
Alex5723
15 hours, 42 minutes ago -
How a new type of AI is helping police skirt facial recognition bans
by
Alex5723
16 hours, 20 minutes ago -
Windows 7 ISO /Windows 10 ISO
by
ECWS
1 hour, 10 minutes ago -
No HP software folders
by
fpefpe
1 day ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
3 hours, 25 minutes ago -
Stay connected anywhere
by
Peter Deegan
1 day, 5 hours ago -
Copilot, under the table
by
Will Fastie
20 hours, 37 minutes ago -
The Windows experience
by
Will Fastie
1 day, 11 hours ago -
A tale of two operating systems
by
Susan Bradley
1 day, 2 hours ago -
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
1 day, 16 hours ago -
Where’s the cache today?
by
Up2you2
2 days, 8 hours ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
2 days, 1 hour ago -
Nintendo Switch 2 has a remote killing switch
by
Alex5723
1 day, 1 hour ago -
Blocking Search (on task bar) from going to web
by
HenryW
3 hours, 38 minutes ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
3 days, 1 hour ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
3 days, 1 hour ago -
regarding april update and may update
by
heybengbeng
3 days, 3 hours ago -
MS Passkey
by
pmruzicka
2 days, 5 hours ago -
Can’t make Opera my default browser
by
bmeacham
3 days, 10 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.