Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
SakDaddy
 
Posts: n/a
Default I want to remove alphas from within a number.

If I have a column of numbers that have 123a4b5c and I want to remove the
"abc" so that the change reads 12345, what is the function I use?
  #2   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
Posts: n/a
Default I want to remove alphas from within a number.


I would suggest a user defined function which sequentially substitutes
that characters with nothing.


Function RemoveAlphas(Cell)
TestString = Cell.Value
For N = Len(Cell) To 1 Step -1
If Asc(Mid(TestString, N, 1)) < 48 Or Asc(Mid(TestString, N, 1))
57 Then
TestString = Left(TestString, N - 1) & Right(TestString,
Len(TestString) - N)
End If
Next N
RemoveAlphas = TestString
End Function

Martin

http://homepage.ntlworld.com/martin.rice1/


--
mrice
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=532039

  #3   Report Post  
Posted to microsoft.public.excel.misc
Duke Carey
 
Posts: n/a
Default I want to remove alphas from within a number.

Are all your text values laid out the same:

3 digits, 1 alpha, 1 digit, 1 alpha, 1 digit, 1 alpha?

If so, then use

=value(left("123a4b5c",3)&mid("123a4b5c" 5,1)&midmid("123a4b5c" 7,1))





"SakDaddy" wrote:

If I have a column of numbers that have 123a4b5c and I want to remove the
"abc" so that the change reads 12345, what is the function I use?

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
2nd attempt ~ complicated formula Luke Excel Worksheet Functions 3 November 9th 05 03:33 AM
how do i remove telephone number hyphens from a list in Excel? Mediazoo Excel Discussion (Misc queries) 4 November 3rd 05 08:29 PM
Number of labels on X-axis one more than number of values on Y-axi Gudrun Charts and Charting in Excel 5 August 26th 05 01:55 PM
duplicate number Daniell Excel Discussion (Misc queries) 1 March 16th 05 07:02 PM
Where is DateDiff function in Excel 2002 ? Nigel Welch Excel Worksheet Functions 4 March 4th 05 03:18 PM


All times are GMT +1. The time now is 02:25 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"