Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Compare between String and Value using VBA

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
compare string HugeHard Excel Worksheet Functions 1 October 30th 08 04:59 AM
Compare text string of a cell in Column A VS another cell in Colum Tan New Users to Excel 2 August 1st 07 09:45 AM
Compare text string of a cell in Column A VS another cell in Colum Tan Excel Discussion (Misc queries) 1 August 1st 07 09:03 AM
Compare text string of a cell in Column A VS another cell in Colum Tan Excel Worksheet Functions 1 August 1st 07 09:01 AM
string compare with wildcards Marcus Hoffmann Excel Programming 0 April 26th 05 09:31 AM


All times are GMT +1. The time now is 09:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"