View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Edwin Tam[_7_] Edwin Tam[_7_] is offline
external usenet poster
 
Posts: 94
Default Determine if a character is numeric or non-numeric

Your method is one of the "safest" methods.

Someone may suggest a more "standard" method of using "Isnumeric", for
example:

Isnumeric("1")

However, this is not always "safe", especially in older versions of Excel
(e.g. Excel 5 and 97) Therefore, to test single characters, it's not worth
taking the risk. So, I think using the ASC test is more safe.

Regards,
Edwin Tam

http://www.vonixx.com



"AP" wrote:

Is there a more efficient way to determine if a single character is a
number versus a non-number?

I use the ASC() function to check for the ASCII values between 48-57?

Thanks in advance