Testing a string againsts a list of strings

J

JCO

Does VB for Excel have a method of testing a string to see if it matches a
list of strings similar to "If... Statements"? I would still need to
perform an action if the statement is true (or false depending on the
logic).

If so, I would assume the opposite can be done... see if "String" is one of
the list of strings.

Thanks
 
C

Claus Busch

Hi,

Am Thu, 14 Nov 2013 13:01:25 -0600 schrieb JCO:
Does VB for Excel have a method of testing a string to see if it matches a
list of strings similar to "If... Statements"? I would still need to
perform an action if the statement is true (or false depending on the
logic).

are your strings into the sheet? Then you could use
Worksheetfunction.CountIf


Regards
Claus B.
 
J

JCO

Yes they are. This will work.
Thanks again.

Claus Busch said:
Hi,

Am Thu, 14 Nov 2013 13:01:25 -0600 schrieb JCO:


are your strings into the sheet? Then you could use
Worksheetfunction.CountIf


Regards
Claus B.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top