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, 3 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
-
WU help needed with “Some settings are managed by your organization”
by
Peobody
3 hours, 14 minutes ago -
No Newsletters since 27 January
by
rog7
7 hours, 23 minutes ago -
Linux Mint Debian Edition 7 gets OEM support, death of Ubuntu-based Mint ?
by
Alex5723
7 hours, 44 minutes ago -
Windows Update “Areca Technology Corporation – System – 6.20.0.41”
by
Bruce
2 hours, 33 minutes ago -
Google One Storage Questions
by
LHiggins
10 hours, 4 minutes ago -
Button Missing for Automatic Apps Updates
by
pmcjr6142
5 hours, 20 minutes ago -
Ancient SSD thinks it’s new
by
WSila
2 hours, 19 minutes ago -
Washington State lab testing provider exposed health data of 1.6 million people
by
Nibbled To Death By Ducks
18 hours, 3 minutes ago -
WinRE KB5057589 fake out
by
Susan Bradley
11 hours, 22 minutes ago -
The April 2025 Windows RE update might show as unsuccessful in Windows Update
by
Susan Bradley
2 hours ago -
Firefox 137
by
Charlie
10 minutes ago -
Whisky, a popular Wine frontend for Mac gamers, is no more
by
Alex5723
1 day, 6 hours ago -
Windows 11 Insider Preview build 26120.3863 (24H2) released to BETA
by
joep517
1 day, 6 hours ago -
Windows 11 Insider Preview build 26200.5551 released to DEV
by
joep517
1 day, 6 hours ago -
New Windows 11 PC setup — can I start over in the middle to set up a local id?
by
ctRanger
2 hours, 29 minutes ago -
Windows 11 Insider Preview Build 26100.3902 (24H2) released to Release Preview
by
joep517
1 day, 10 hours ago -
Oracle kinda-sorta tells customers it was pwned
by
Nibbled To Death By Ducks
1 day, 16 hours ago -
Global data centers (AI) are driving a big increase in electricity demand
by
Kathy Stevens
2 days, 2 hours ago -
Office apps read-only for family members
by
b
2 days, 5 hours ago -
Defunct domain for Microsoft account
by
CWBillow
2 days, 2 hours ago -
24H2??
by
CWBillow
2 hours, 23 minutes ago -
W11 23H2 April Updates threw ‘class not registered’
by
WindowsPersister
1 day, 10 hours ago -
Master patch listing for April 8th, 2025
by
Susan Bradley
2 hours, 13 minutes ago -
TotalAV safety warning popup
by
Theodore Nicholson
1 day, 1 hour ago -
two pages side by side land scape
by
marc
4 days, 2 hours ago -
Deleting obsolete OneNote notebooks
by
afillat
4 days, 5 hours ago -
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
3 days, 7 hours ago -
Security Essentials or Defender?
by
MalcolmP
3 days, 10 hours ago -
April 2025 updates out
by
Susan Bradley
8 hours, 9 minutes ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
3 days, 4 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.