Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Numeric to character | Excel Discussion (Misc queries) | |||
TO DELETE ONLY NUMERIC VALUES IN A CHARACTER AND NUMERIC CELL IN | Excel Discussion (Misc queries) | |||
how do I convert numeric value to its character value ex. 10=Ten | Excel Worksheet Functions | |||
How to determine the value of a printable character? | Excel Discussion (Misc queries) | |||
How to determine the value of a printable character? | Excel Discussion (Misc queries) |