Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
test if a character in a string is alpha
Dear All,
I need to convert part of a string to a number. the string can be x characters long, but I only want the first teo characters, where they are numbers. I am having trouble catching cases where wither first or second character is alpha. If (Mid(sshift, 2, 1) = "A") Or (Mid(sshift, 2, 1) = "P") Then iShftStart = CInt(Left(sshift, 1)) ' case where shift is written as 8AM or 8PM Else iShftStart = CInt(Left(sshift, 2)) End If my conditions need to include any ascii alpha character, really. Any suggestions? Many thanks, Matilda |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
if alpha character | Excel Discussion (Misc queries) | |||
How to test if the end character of a string is within a user-definedlist? | Excel Discussion (Misc queries) | |||
Excel-Match 1st text character in a string to a known character? | Excel Worksheet Functions | |||
Function to return Character Position of Xth character within a string | Excel Programming | |||
Increment Alpha Character | Excel Programming |