Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default To remove numbers in a cell with out using the macro

Dear All,
Consider a cell in which both Alphabet & numbers. I want to remove only the
number from that cell. I have don this using the SUBSTITUTE Function. But i
have to write the 10 subtitute fucntion in ten different cells. Is there any
other method to do it.
For example, in the cell a1, has the following text
abv1234111f5ds4fsd54fds54fsdf4ds6111111111119802
Formula which i used in b1 to K1 cells
=SUBSTITUTE(A1,1,"") and the answer is abv234f5ds4fsd54fds54fsdf4ds69802
=SUBSTITUTE(B1,2,"") and the result is abv34f5ds4fsd54fds54fsdf4ds6980 like
this i used this formula.
Is there is any other option to do this process in a single cell.
Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default To remove numbers in a cell with out using the macro

Formula way: (using a helper column)
In cell A1 you have the text

In cell B1 (helper column)
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(A1,1,),2,),3,),4,),5,)

In cell C1
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(B1,6,),7,),8,),9,),0,)

UDF: Try this UDF (User Defined function). From workbook launch VBE using
Alt+F11. From menu Insert a Module and paste the below function.Close and get
back to workbook and try the below formula.

=RemoveNums(A1)

Function RemoveNums(strData As String) As String
Dim intTemp As Integer
For intTemp = 1 To Len(strData)
If Not IsNumeric(Mid(strData, intTemp, 1)) Then _
RemoveNums = RemoveNums & Mid(strData, intTemp, 1)
Next
End Function

If this post helps click Yes
---------------
Jacob Skaria


"Vital_ar" wrote:

Dear All,
Consider a cell in which both Alphabet & numbers. I want to remove only the
number from that cell. I have don this using the SUBSTITUTE Function. But i
have to write the 10 subtitute fucntion in ten different cells. Is there any
other method to do it.
For example, in the cell a1, has the following text
abv1234111f5ds4fsd54fds54fsdf4ds6111111111119802
Formula which i used in b1 to K1 cells
=SUBSTITUTE(A1,1,"") and the answer is abv234f5ds4fsd54fds54fsdf4ds69802
=SUBSTITUTE(B1,2,"") and the result is abv34f5ds4fsd54fds54fsdf4ds6980 like
this i used this formula.
Is there is any other option to do this process in a single cell.
Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default To remove numbers in a cell with out using the macro

Thank you Jacob Skaria. I have already wrote the macro and using it. Thanks
for this Nested Substitute

"Jacob Skaria" wrote:

Formula way: (using a helper column)
In cell A1 you have the text

In cell B1 (helper column)
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(A1,1,),2,),3,),4,),5,)

In cell C1
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(B1,6,),7,),8,),9,),0,)

UDF: Try this UDF (User Defined function). From workbook launch VBE using
Alt+F11. From menu Insert a Module and paste the below function.Close and get
back to workbook and try the below formula.

=RemoveNums(A1)

Function RemoveNums(strData As String) As String
Dim intTemp As Integer
For intTemp = 1 To Len(strData)
If Not IsNumeric(Mid(strData, intTemp, 1)) Then _
RemoveNums = RemoveNums & Mid(strData, intTemp, 1)
Next
End Function

If this post helps click Yes
---------------
Jacob Skaria


"Vital_ar" wrote:

Dear All,
Consider a cell in which both Alphabet & numbers. I want to remove only the
number from that cell. I have don this using the SUBSTITUTE Function. But i
have to write the 10 subtitute fucntion in ten different cells. Is there any
other method to do it.
For example, in the cell a1, has the following text
abv1234111f5ds4fsd54fds54fsdf4ds6111111111119802
Formula which i used in b1 to K1 cells
=SUBSTITUTE(A1,1,"") and the answer is abv234f5ds4fsd54fds54fsdf4ds69802
=SUBSTITUTE(B1,2,"") and the result is abv34f5ds4fsd54fds54fsdf4ds6980 like
this i used this formula.
Is there is any other option to do this process in a single cell.
Thanks in advance.

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
Macro to remove space at front and end of a cell yhoy Excel Discussion (Misc queries) 2 February 22nd 08 09:53 PM
How to remove empty spaces in a cell with numbers? Tobias Excel Worksheet Functions 2 October 24th 07 02:08 PM
How can I remove 4 of 9 numbers from a cell for the whole column? RISXRAY Excel Discussion (Misc queries) 5 September 14th 06 05:33 PM
remove text from cell containing numbers Tim Excel Discussion (Misc queries) 2 March 22nd 06 02:30 PM
How can I remove diff. numbers from a cell combined with text Greg Excel Discussion (Misc queries) 5 February 28th 06 07:57 PM


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

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

About Us

"It's about Microsoft Excel"