Extract text or numbers

Nikhil

New Member
Joined
Feb 23, 2004
Messages
37
I have data in celss in the format

A665BT
62ABC
ABC62

I want to segregate numbers and caharcters.

Any help? :p
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi Nikhil,

ASAP has an easy utility that can help. You can download at

http://www.asap-utilities.com

Once ASAP utilitiy is installed. I would copy column with data so that you would then have two identical columns with text and numbers mixed.

Then select first column and go Excel menu and select "ASAP Utilities" then "Text" then "Delete all text characters in selection" then "OK".

Select second column and go to the Excel menu and select "ASAP Utilites" then "Text" then "Delete all numbers in selection" then "OK"

That would separate numbers from text in two separate columns
 
Upvote 0
Also try following. Select the cell you want to start to separate, then run the codes.
===============================
Sub Separeate()
Dim i As Integer
Dim x1, x2
Dim Number As Long
Dim Text As String
Dim myCell As Range

Set myCell = ActiveCell
On Error Resume Next
Do Until myCell = ""
For i = 1 To Len(myCell)
x1 = Mid(myCell, i, 1)
x2 = CInt(Mid(myCell, i, 1))
If Err Then
Text = Text & x1
Err.Clear
Else
Number = Number & x2
End If
Next
With myCell
.Offset(0, 1) = Number
.Offset(0, 2) = Text
Set myCell = .Offset(1, 0)
End With
Text = ""
Number = 0
Loop
End Sub
=====================================
[/code]
 
Upvote 0

Forum statistics

Threads
1,207,392
Messages
6,078,223
Members
446,323
Latest member
fishezuk

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top