Prev: Local cube files
Next: make it text in vlookup
From: salgud on 22 Mar 2010 18:29 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 22 Mar 2010 18:51 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 22 Mar 2010 18:52 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 22 Mar 2010 19:54 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 23 Mar 2010 09:38
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! |