Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Determine if character is text or numeric?

Within a range, I have designators that should be in the format "B-123".
But I have occasions where the "-" was left out. I also have occasions
where there is an entire word there (ie: "Basic"). So I will run down the
column, setting the value of each cell into a string and check the second
character (Right (Left (strCell, 2), 1); if it's numeric, I need to replace
"B" with "B-". But I can't figure out how to check if that character is
text or numeric. Any help is appreciated.

Ed


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Determine if character is text or numeric?


"Ed" wrote in message
...
Within a range, I have designators that should be in the format "B-123".
But I have occasions where the "-" was left out. I also have occasions
where there is an entire word there (ie: "Basic"). So I will run down the
column, setting the value of each cell into a string and check the second
character (Right (Left (strCell, 2), 1); if it's numeric, I need to

replace
"B" with "B-". But I can't figure out how to check if that character is
text or numeric. Any help is appreciated.

Ed



There's an ISNUMBER function that you can use:
http://www.techonthenet.com/excel/formulas/isnumber.htm
/Fredrik


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Determine if character is text or numeric?

There is a function called isnumeric. You may have difficulty with the -
charachter as is numeric will see that as a negative sign...

HTH

"Ed" wrote:

Within a range, I have designators that should be in the format "B-123".
But I have occasions where the "-" was left out. I also have occasions
where there is an entire word there (ie: "Basic"). So I will run down the
column, setting the value of each cell into a string and check the second
character (Right (Left (strCell, 2), 1); if it's numeric, I need to replace
"B" with "B-". But I can't figure out how to check if that character is
text or numeric. Any help is appreciated.

Ed



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
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
How to determine the value of a printable character? Dennis Excel Discussion (Misc queries) 2 February 13th 06 09:49 PM
How to determine the value of a printable character? Bob Umlas, Excel MVP Excel Discussion (Misc queries) 0 February 13th 06 08:39 PM


All times are GMT +1. The time now is 03:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"