Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I have a large series of data in VBA that I'm trying to identify as
different types. For example, is the string a phone number? I tried InStr(1, strMyString, "###-###-####") hoping that the #'s would serve as wild cards. I also used * in place of the #. Neither worked. Any ideas on how to identify whether a string is a phone number? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the like command
MyStr = "123-456-7890" ? mystr like "###-###-####" True myStr = "1234567890" ? mystr like "###-###-####" False -- Regards, Tom Ogilvy "Dave B" wrote in message ... Hi, I have a large series of data in VBA that I'm trying to identify as different types. For example, is the string a phone number? I tried InStr(1, strMyString, "###-###-####") hoping that the #'s would serve as wild cards. I also used * in place of the #. Neither worked. Any ideas on how to identify whether a string is a phone number? Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In addition to Tom's comments -
you might need to determine all possible phone types depending on your source? ###.###.#### ########## international? ### ### #### "Tom Ogilvy" wrote: Use the like command MyStr = "123-456-7890" ? mystr like "###-###-####" True myStr = "1234567890" ? mystr like "###-###-####" False -- Regards, Tom Ogilvy "Dave B" wrote in message ... Hi, I have a large series of data in VBA that I'm trying to identify as different types. For example, is the string a phone number? I tried InStr(1, strMyString, "###-###-####") hoping that the #'s would serve as wild cards. I also used * in place of the #. Neither worked. Any ideas on how to identify whether a string is a phone number? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
convert to GBP - formula to identify 1st character and Acc type | Excel Discussion (Misc queries) | |||
how to convert date type to text type | Excel Discussion (Misc queries) | |||
fHow to write in a formula "if a nuber s between these two numbers | Excel Discussion (Misc queries) | |||
Function to calculate the nuber of weeks between dates? | Excel Worksheet Functions | |||
Nuber of Days between two Dates | Excel Programming |