From: salgud on
I have played with it for an hour, but can't figure out how to make a case
statement that would be something like:

Case is = (string1 contains string2)

Is there a way to do this?
Thanks!
From: Don Guillett on
Look in the vba help index for
INSTR

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett(a)gmail.com
"salgud" <spamboy6547(a)comcast.net> wrote in message
news:1ut0t36te1qu.fei2ej61q0hm.dlg(a)40tude.net...
>I have played with it for an hour, but can't figure out how to make a case
> statement that would be something like:
>
> Case is = (string1 contains string2)
>
> Is there a way to do this?
> Thanks!

From: Gary Keramidas on
simplistic, but may give you an idea, since you didn't provide much.

Sub test()
Select Case True
Case InStr(1, "this is a test", "tst")
Debug.Print "True"
Case Else
Debug.Print "False"
End Select
End Sub


--


Gary Keramidas
Excel 2003


"salgud" <spamboy6547(a)comcast.net> wrote in message
news:1ut0t36te1qu.fei2ej61q0hm.dlg(a)40tude.net...
>I have played with it for an hour, but can't figure out how to make a case
> statement that would be something like:
>
> Case is = (string1 contains string2)
>
> Is there a way to do this?
> Thanks!

From: Bob Phillips on
Try

Select Case True

Case string1 Like "*string2*"

etc.
End Select

--

HTH

Bob

"salgud" <spamboy6547(a)comcast.net> wrote in message
news:1ut0t36te1qu.fei2ej61q0hm.dlg(a)40tude.net...
>I have played with it for an hour, but can't figure out how to make a case
> statement that would be something like:
>
> Case is = (string1 contains string2)
>
> Is there a way to do this?
> Thanks!


From: salgud on
On Mon, 22 Mar 2010 16:29:40 -0600, salgud wrote:

> I have played with it for an hour, but can't figure out how to make a case
> statement that would be something like:
>
> Case is = (string1 contains string2)
>
> Is there a way to do this?
> Thanks!

Thanks to all!
 |  Next  |  Last
Pages: 1 2
Prev: Local cube files
Next: make it text in vlookup