PC Review


Reply
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

 
Reply With Quote
 
 
 
 
=?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
>
>

 
Reply With Quote
 
 
 
 
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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TO DELETE ONLY NUMERIC VALUES IN A CHARACTER AND NUMERIC CELL IN ramesh k. goyal - abohar Microsoft Excel Misc 1 28th Oct 2009 07:50 AM
Determine if a character is numeric or non-numeric AP Microsoft Excel Programming 2 10th May 2005 09:06 PM
Determine if character is text or numeric? Ed Microsoft Excel Programming 2 6th Jan 2005 12:31 AM
Re: List of Character Codes (ALT + numeric keypad = character) Rob Schneider Microsoft Word Document Management 0 10th Sep 2003 03:35 PM
List of Character Codes (ALT + numeric keypad = character) 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.