I am trying to figure out how to split a column that contains alpha numeric characters. For example, I have in Cell A1, ABC1234567,
Cell A2 has AB12345678, Cell A3 has ABCDE12345 and Cell A4 has ABC12 34 567. Is there any way of turning column A into 2 separate columns, one containing all the alpha characters and another containing all the numeric characters?
![]() |
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 |
-
Splitting alpha numeric cells (Microsoft 97)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Splitting alpha numeric cells (Microsoft 97)
- This topic has 19 replies, 7 voices, and was last updated 23 years, 2 months ago.
AuthorTopicWSMike Chez
AskWoody LoungerDecember 3, 2001 at 5:18 pm #363677Viewing 5 reply threadsAuthorReplies-
WSWassim
AskWoody Lounger -
WSSammyB
AskWoody Lounger -
WSWassim
AskWoody LoungerDecember 3, 2001 at 9:00 pm #555792Sammy
NO one can compete with BobU on these kind of formulas. Bob is one of a kind
…
But to be honest I did have his formula as a basis to start from. Maybe something that would test if IsNumber. But then how do you split the cell after you find where to split it.This has to be two column-formula.
Wassim
-
WSJohnBF
AskWoody LoungerDecember 3, 2001 at 10:23 pm #555811You guys need to cheat! King Bob Umlas’ answer is right here (two tweaks courtesy of me). This part extracts the numbers, must be array-entered:
{=1*MID(SUBSTITUTE(A1,” “,””),MATCH(FALSE,ISERROR(1*MID(A1,ROW($1:$10),1)),0),255)}
(So who cares if I don’t understand it?)
And, assuming the source data is in Column A, and the above is in column B, extarcting the letters is easy:
=LEFT(A1,LEN(SUBSTITUTE(A1,” “,””))-LEN(B1))
-
WSSammyB
AskWoody Lounger -
WSJohnBF
AskWoody Lounger -
WSWassim
AskWoody LoungerDecember 4, 2001 at 2:07 pm #555887John
I just hope Mike is paying attention to all what we are offering.
BUT I guess you need to go back to the drawing board because your formula needs some work.
If the Number are followed by Text then (1*MID(A1,ROW($1:$10),1)) gets to be Number #Value.
But all in all, its impressive.
Wassim
-
WSJohnBF
AskWoody Lounger -
WSSammyB
AskWoody Lounger
-
-
-
-
-
H. Legare Coleman
AskWoody PlusDecember 3, 2001 at 9:14 pm #555795The following VBA code will split the values in Column A on Sheet1 like you want into columns B and C.
Public Sub SplitA() Dim I As Long, J As Long I = 0 With Worksheets("Sheet1").Range("A1") While .Offset(I, 0).Value "" For J = 1 To Len(.Offset(I, 0).Value) If IsNumeric(Mid(.Offset(I, 0).Value, J, 1)) Then Exit For End If Next J .Offset(I, 1).Value = Left(.Offset(I, 0), J - 1) .Offset(I, 2).Value = Right(.Offset(I, 0), Len(.Offset(I, 0)) - J + 1) I = I + 1 Wend End With End Sub
-
WSWassim
AskWoody Lounger -
WSMike Chez
AskWoody LoungerDecember 4, 2001 at 11:17 pm #555977Thank you all for all of your responses. It’s 6:10PM on 12/4. Due to other problems that came up at woork, this is the first time that I had a chance to do anything with your suggestions.
LegareColeman: I just typed your code in and I got a Run time error ’13’: Type Mismatch relating to the line containing
While.Offset(I,0).Value””. I don’t know what I did wrong or could be wrong. -
H. Legare Coleman
AskWoody Plus -
WSMike Chez
AskWoody Lounger -
H. Legare Coleman
AskWoody Plus
-
-
-
WSAndrew Cronnolly
AskWoody LoungerDecember 5, 2001 at 12:57 pm #556159Just anther option for you in the form of a function. The following function will return the left part of a string from th estart up to the last text character. If all your entries start with Text and then switch to numbers it should work fine.
Function ExtractText(rng As Range) Dim i As Long, strTemp As String strTemp = rng.Value For i = 1 To Len(strTemp) If Not IsNumeric(Mid(strTemp, i, 1)) Then ExtractText = Left(strTemp, i) End If Next End Function
If A1 contains ABC123,
then in B1 =ExtractText(A1) will return ABC,
and in C1 =RIGHT(A1,(LEN(A1)-LEN(B1))) will return 123.
Just one more option for you.
Andrew C
-
-
WSSammyB
AskWoody LoungerDecember 5, 2001 at 1:12 pm #556167Mike, Legare’s code works for me. When you want to use anyone’s post, select the text and copy it to Word, then select it again in Word and copy it to VBA.
Since you seem to prefer a VBA solution, here is a general-pupose function, STRIP. It strips off whatever you don’t want, letters, numbers, or punctuation. So, in your case =STRIP(A1,”Numbers”) would give “ABC”. HTH –Sam
Option Explicit Public Function STRIP(TEXT As Variant, OP As Variant) ' TEXT is any string ' OP is what to strip: NUMBERS, LETTERS, or PUNCTUATION ' (only the first letter is needed: N, L, or P) Dim i As Integer Dim letter As String Dim s As String s = "" For i = 1 To Len(TEXT) letter = Mid(TEXT, i, 1) If IsNumeric(letter) Then If Left(UCase(OP), 1) = "L" Then s = s & letter End If Else If Left(UCase(OP), 1) = "N" Then s = s & letter End If End If If Left(UCase(OP), 1) = "P" Then If IsNumeric(letter) Or _ (Asc(UCase(letter)) >= Asc("A") And Asc(UCase(letter)) <= Asc("Z")) Then s = s & letter End If End If Next i STRIP = s End Function
-
WSMike Chez
AskWoody Lounger
-
-
WSAladin Akyurek
AskWoody LoungerJanuary 13, 2002 at 9:51 am #563461Given the structure of your examples,
{“ABC1234567”;
“AB12345678”;
“ABC12 34 567″}which, say, A1:A3 houses,
in B1 enter: =SUBSTITUTE(A1,RIGHT(A1,SUMPRODUCT((LEN(A1)-LEN(SUBSTITUTE(A1,{” “,0,1,2,3,4,5,6,7,8,9},””))))),””)
in C1 enter: =SUBSTITUTE(A1,B1,””) or, depending on what you’d prefer, =SUBSTITUTE(SUBSTITUTE(A1,B1,””),” “,””)+0
Select B1:C1 and copy down.
Viewing 5 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
-
Mail from certain domains not delivered to my outlook.com address
by
pumphouse
1 hour, 12 minutes ago -
Is data that is in OneDrive also taking up space on my computer?
by
WShollis1818
2 hours, 20 minutes ago -
Nvidia just fixed an AMD Linux bug
by
Alex5723
20 hours, 33 minutes ago -
50 years and counting
by
Susan Bradley
4 hours, 28 minutes ago -
Fix Bluetooth Device Failed to Delete in Windows Settings
by
Drcard:))
3 hours, 18 minutes ago -
Licensing and pricing updates for on-premises server products coming July 2025
by
Alex5723
1 day, 7 hours ago -
Edge : Deprecating window.external.getHostEnvironmentValue()
by
Alex5723
1 day, 7 hours ago -
Rethinking Extension Data Consent: Clarity, Consistency, and Control
by
Alex5723
1 day, 7 hours ago -
OneNote and MS Word 365
by
CWBillow
1 day, 9 hours ago -
Ultimate Mac Buyers Guide 2025: Which Mac is Right For You?
by
Alex5723
1 day, 9 hours ago -
Intel Unison support ends on Windows 11 in June
by
Alex5723
1 day, 9 hours ago -
April 2025 — still issues with AMD + 24H2
by
Kevin Jones
1 day, 10 hours ago -
Windows 11 Insider Preview build 26200.5518 released to DEV
by
joep517
1 day, 21 hours ago -
Windows 11 Insider Preview build 26120.3671 (24H2) released to BETA
by
joep517
1 day, 21 hours ago -
Forcing(or trying to) save Local Documents to OneDrive
by
PateWilliam
2 days, 6 hours ago -
Hotpatch for Windows client now available (Enterprise)
by
Alex5723
1 day, 18 hours ago -
MS-DEFCON 2: Seven months and counting
by
Susan Bradley
19 hours, 28 minutes ago -
My 3 monitors go black & then the Taskbar is moved to center monitor
by
saturn2233
2 days, 15 hours ago -
Apple backports fixes
by
Susan Bradley
1 day, 22 hours ago -
Win 11 24H2 will not install
by
Michael1950
19 hours, 42 minutes ago -
Advice to convert MBR to GPT and install Windows 11 Pro on unsupported PC
by
Andy M
2 hours, 38 minutes ago -
Photos from iPhone to Win 10 duplicating/reformatting to .mov
by
J9438
1 day, 4 hours ago -
Thunderbird in trouble. Here comes Thundermail
by
Alex5723
4 hours, 28 minutes ago -
Get back ” Open With” in context menus
by
CWBillow
3 days, 6 hours ago -
Many AMD Ryzen 9800X3D on ASRock have died
by
Alex5723
1 day, 22 hours ago -
simple general stupid question
by
WSaltamirano
3 days, 4 hours ago -
April 2025 Office non-Security updates
by
PKCano
3 days, 21 hours ago -
Microsoft wants to hear from you
by
Will Fastie
1 day, 12 hours ago -
Windows 11 Insider Preview Build 22635.5160 (23H2) released to BETA
by
joep517
4 days ago -
Europe Seeks Alternatives to U.S. Cloud Providers
by
Alex5723
4 days, 6 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.