Testing a string againsts a list of strings

  • Thread starter Thread starter JCO
  • Start date Start date
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
 
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.
 
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.
 
Back
Top