You are here:

Excel/How to separate numeric & alphabet from the values in the cell?


Yew wrote at 2012-10-07 17:27:17
Just for fun. Code minimized.

function AlphaNum(InString as String, getNumber as Boolean) as String

Dim s as string

Dim i as Long

Dim b as boolean

For i = 1 to len(inString)

 s = mid(InString,i,1)

 b = IsNumeric(s)

 if (b and getNumber) or (not b and not getNumber) then

   AlphaNum = AlphaNum & s

 end if

Next i

End Function

pooja wrote at 2012-10-25 10:38:30
this is good

but if the input is like:  contact: 887456-45575 and want ouput: 88745645575 then it not works .

pleas help me

thanku in advance

About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts




I can answer questions regarding using Excel in general, analytics, macros, VBA, formulae, etc. I try to understand your business requirement, and suggest an effective and efficient method to solve your problem. Hire me to work on your project at


I have extensively used MS Excel since version 2000 up to 2007 in various business scenarios such as evaluating feasibility of a project or investment, compiling small level database and running metrics on them, formula to manipulate and extract information from unorganized data, forms to use Excel data in external applications, etc. I am a Business Analyst by profession and Excel is a key requirement.

Coal and Oil, LLC

MS(IT)+MBA Dual Degree, Bentley University, USA

©2017 All rights reserved.

[an error occurred while processing this directive]