Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Alpha with numeric and numeric only numbers in a column

I have a column with 2 alpha letters leading numbers and also numbers only in
the same column. I want to put all records in a new column without any
alpha. How would I do that?

Example:

ar3456789
bt56789
234567
78901234
etc.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Alpha with numeric and numeric only numbers in a column

Hi,


=LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0 123456789")),ROW($1:$10000))))

All 1 line drag down as required

Mike

"rciolkosz" wrote:

I have a column with 2 alpha letters leading numbers and also numbers only in
the same column. I want to put all records in a new column without any
alpha. How would I do that?

Example:

ar3456789
bt56789
234567
78901234
etc.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Alpha with numeric and numeric only numbers in a column

Copy/paste this UDF to a general module in your workbook.

Function RemAlpha(str As String) As String
'Remove Alphas from a string
Dim re As Object
Set re = CreateObject("vbscript.regexp")
re.Global = True
re.Pattern = "\D"
RemAlpha = re.Replace(str, "")
End Function

In a helper column enter

=RemAlpha(cellref)

Drag/copy down.


Gord Dibben MS Excel MVP

On Fri, 18 Sep 2009 11:53:01 -0700, rciolkosz
wrote:

I have a column with 2 alpha letters leading numbers and also numbers only in
the same column. I want to put all records in a new column without any
alpha. How would I do that?

Example:

ar3456789
bt56789
234567
78901234
etc.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Alpha with numeric and numeric only numbers in a column

Tik Num Num Only
rc65789876 0
dl987898
768765544 987898
234876
234876

It returned above. It appears it only did every other line.



"Mike H" wrote:

Hi,


=LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0 123456789")),ROW($1:$10000))))

All 1 line drag down as required

Mike

"rciolkosz" wrote:

I have a column with 2 alpha letters leading numbers and also numbers only in
the same column. I want to put all records in a new column without any
alpha. How would I do that?

Example:

ar3456789
bt56789
234567
78901234
etc.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Alpha with numeric and numeric only numbers in a column

This works well but is skipping every other line.

"Mike H" wrote:

Hi,


=LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0 123456789")),ROW($1:$10000))))

All 1 line drag down as required

Mike

"rciolkosz" wrote:

I have a column with 2 alpha letters leading numbers and also numbers only in
the same column. I want to put all records in a new column without any
alpha. How would I do that?

Example:

ar3456789
bt56789
234567
78901234
etc.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Alpha with numeric and numeric only numbers in a column

It looks to me like you entered the formula in b2, but kept the a1 reference
in the formula.

Responders don't know what cell addresses to use, unless you tell them
specifically where your data is. If you don't identify the location, then
they can only show a sample, and typically use a1. Change the a1 in the
formula to the correct address of the first cell you want to check (likely
a2). Then copy it down.

Regards,
Fred.

"rciolkosz" wrote in message
...
Tik Num Num Only
rc65789876 0
dl987898
768765544 987898
234876
234876

It returned above. It appears it only did every other line.



"Mike H" wrote:

Hi,


=LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0 123456789")),ROW($1:$10000))))

All 1 line drag down as required

Mike

"rciolkosz" wrote:

I have a column with 2 alpha letters leading numbers and also numbers
only in
the same column. I want to put all records in a new column without any
alpha. How would I do that?

Example:

ar3456789
bt56789
234567
78901234
etc.


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Alpha with numeric and numeric only numbers in a column

On Fri, 18 Sep 2009 12:16:05 -0700, rciolkosz
wrote:

It returned above. It appears it only did every other line.


Mike's formula assumed your first entry as in A1. If you copied it, but did
not change the cell references appropriately, you might have see strange
results. Although I don't understand the "every other line" issue, nor the
fact, from what you show above, that you did not extract the entire number.

Please copy/paste the formula that you are using; and copy/paste the results.

Also, there may be something about the cell formatting that is throwing things
off.
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If statement for alpha numeric combo AND numeric only Jdude Excel Discussion (Misc queries) 4 July 13th 09 06:14 AM
Alphanumeric Sorting - numeric alpha numeric Mike Excel Worksheet Functions 2 September 15th 08 10:12 PM
only extract numeric value from alpha numeric cell Fam via OfficeKB.com Excel Discussion (Misc queries) 5 April 26th 06 06:49 PM
Split the numbers in a alpha numeric case Jp Excel Discussion (Misc queries) 5 April 7th 06 09:29 PM
Extract Numbers from Alpha-Numeric String MrBill Excel Worksheet Functions 1 November 2nd 05 05:44 PM


All times are GMT +1. The time now is 08:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"