Thread Tools Rate Thread

# Determine if a character is numeric or non-numeric

AP
Guest
Posts: n/a

 10th May 2005
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

=?Utf-8?B?RWR3aW4gVGFt?=
Guest
Posts: n/a

 11th May 2005
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
(E-Mail Removed)
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
>
>

NickHK
Guest
Posts: n/a

 11th May 2005
AP,
If you wish to be pedantic, what does "½" or "?" mean to you ?

Nick

"AP" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post ramesh k. goyal - abohar Microsoft Excel Misc 1 28th Oct 2009 07:50 AM AP Microsoft Excel Programming 2 10th May 2005 09:06 PM Ed Microsoft Excel Programming 2 6th Jan 2005 12:31 AM Rob Schneider Microsoft Word Document Management 0 10th Sep 2003 03:35 PM Joe Johnson Microsoft Word Document Management 0 10th Sep 2003 03:08 PM

Features

Advertising

Newsgroups

All times are GMT +1. The time now is 12:14 AM.