View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_4_] Jim Thomlinson[_4_] is offline
external usenet poster
 
Posts: 1,119
Default Compare between String and Value using VBA

Dim myValue as string

If isnumeric(myValue) then
....
end if

if not isnumeric(myValue) then
....
end if

--
HTH...

Jim Thomlinson


"coco" wrote:

What VBA function can I use to implement a conditional IF like this:

Dim myValue as string

If (string VALUE is TEXT) then
...
end if

if (string VALUE is VALUE) then
...
end if




examples:
string value can be like :
A1
ABC34
XYZ1234

string value as value (only numbers):
12
345
67

Thanks

Coco