Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi christopher ward:
i would do this: Dim linea As Integer linea = 2 do while <YourWorksheet.cells(linea,1).value <"" if (((chr(left(<YourWorksheet.cells(linea,1).value,1 ))=48) and (chr(left(<YourWorksheet.cells(linea,1).value,1)) <=57))or ((chr(left(<YourWorksheet.cells(linea,1).value,1) )=65)and (chr(left(<YourWorksheet.cells(linea,1).value,1)) =90))or ((chr(left(<YourWorksheet.cells(linea,1).value,1) )=97)and (chr(left(<YourWorksheet.cells(linea,1).value,1)) =122)))=true then do what you want End If linea = linea + 1 Loop this code check if the firt character is a 1-9, a-z, A-Z, and do something, add an else sentence to do other things if the first character is a symbol. I hope this would helpful for you, please let me know, Bye! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
range or string or long type | Excel Programming | |||
Determine data type in a string | Excel Programming | |||
Can I evaluate a function parameter(string type) as VBA souce code | Excel Programming | |||
testing for a string type | Excel Programming | |||
Type mismatch? string 2 a long?? | Excel Programming |