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?
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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 LoungerWSMike 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
-
Test post
by
Susan Bradley
2 hours, 3 minutes ago -
Used Systems to delete Temp files Gone WRONG what does this mean?
by
Deo
1 hour, 8 minutes ago -
SSD shuts down on its own
by
CWBillow
3 hours, 29 minutes ago -
OneDrive File Sharing Changes
by
David Clark
5 hours, 55 minutes ago -
OneDrive File Sharing Changes
by
David Clark
7 hours, 59 minutes ago -
Win 10 Pro 22H2 to Win 11 Pro 23H2 Conversion Guide
by
doneager
2 hours, 46 minutes ago -
Today is world backup day
by
Alex5723
11 hours, 13 minutes ago -
Windows .exe on Mint
by
Slowpoke47
9 hours, 32 minutes ago -
Reviewing your licensing options
by
Susan Bradley
1 hour, 3 minutes ago -
Apple has been analyzing your photos since September 2024
by
B. Livingston
4 hours, 36 minutes ago -
What Windows 11 24H2 offers beyond bugs
by
Lance Whitney
28 minutes ago -
Making sense of Settings in Windows 11
by
Simon Bisson
1 hour, 58 minutes ago -
Windows 11 pro fails to log in after upgrading Win 10 pro to Win 11 pro 24h2
by
ben_sitaud
5 hours, 49 minutes ago -
23H2 / 24H2 / Local v. Microsoft Account.
by
CWBillow
3 hours, 35 minutes ago -
YouTube Ad Blocker Blocker
by
bbearren
3 hours, 46 minutes ago -
Obscure historical facts about Windows
by
Cybertooth
5 hours, 24 minutes ago -
Microsoft Backup
by
Linda2019
21 hours, 2 minutes ago -
What is the best notepad++ version for W7?
by
Picky
4 hours, 38 minutes ago -
What are right steps to move MS 365 Office+OneDrive files from PC to iMac?
by
glnz
1 day, 14 hours ago -
How to move existing MS 365 Office with OneDrive files from PC to new iMac
by
glnz
1 day, 14 hours ago -
How to move MS 365 files (some on OneDrive) from PC to iMac
by
glnz
2 days, 9 hours ago -
Microsoft adding Quick Machine Recovery to Windows 11
by
Alex5723
2 days, 9 hours ago -
Microsoft vs Passwords
by
Alex5723
1 day, 17 hours ago -
Windows 11 Insider Preview build 26200.5516 released to DEV
by
joep517
2 days, 13 hours ago -
Windows 11 Insider Preview build 26120.3653 (24H2) released to BETA
by
joep517
2 days, 13 hours ago -
Two March KB5053606 updates?
by
Adam
2 days, 6 hours ago -
MS Edge Not Updating to v134.0.3124.95 (rel. 27-Mar-2025)
by
lmacri
2 days, 7 hours ago -
Intel® Graphics/Sound Driver updates for 7th-10th Gen Intel® Core™ Processor
by
Alex5723
2 days, 9 hours ago -
Is there a comprehensve way to tranfer ALL current Edge Settings into a new Edge
by
Tex265
2 days, 8 hours ago -
Transferring ALL info/settings from current Firefox to new computer Firefox
by
Tex265
2 days, 8 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.