Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Determine if a character is numeric or non-numeric

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Determine if a character is numeric or non-numeric

AP,
If you wish to be pedantic, what does "½" or "?" mean to you ?

Nick


"AP" wrote in message
oups.com...
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
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
Numeric to character Bob[_16_] Excel Discussion (Misc queries) 3 December 8th 09 07:52 PM
TO DELETE ONLY NUMERIC VALUES IN A CHARACTER AND NUMERIC CELL IN ramesh k. goyal - abohar[_2_] Excel Discussion (Misc queries) 1 October 28th 09 06:50 AM
Numeric values as character in CSV GKW in GA Excel Discussion (Misc queries) 3 May 23rd 08 02:16 AM
how do I convert numeric value to its character value ex. 10=Ten Shreesh Asthana Excel Worksheet Functions 1 April 25th 08 09:16 AM
Determine if character is text or numeric? Ed Excel Programming 2 January 5th 05 11:31 PM


All times are GMT +1. The time now is 11:30 PM.

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"