title: VBA: Find variable from list in string
body: <p>I am trying to see if a certain word (or number) from a list is in a certain string.</p>
  
  <p>For example I have the following phrase: "January 20, 2012 and 2011".<br>
  And I am trying to see if the month is in the sentence, however it doesn't matter what month is present in the sentence as long as there is a month. (So "February 20, 2012 and 2011" will pass aswell)</p>
  
  <p>I was thinking about something like:</p>
  
  <pre><code>Sub Run_Find()
  Dim Month As String, Number, Year, Splitmonth As Variant
  Dim ii As Integer
  
  Month = "January, February, March, April, May, June, July, August, September, October, November, December"
  Number = "1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 28, 29, 30, 31"
  Year = "2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015"
  
  Splitmonth = VBA.Split(Month, ",")
  For ii = 0 To 12
      If VBA.InStr(1, "January 30, 2012 and 2011", Splitmonth(ii)) &gt; 0 Then
          MsgBox "Found it!"
      Else
          MsgBox "Nop!"
      End If
  Next ii
  
  End Sub
  </code></pre>
  
  <p>This works. But is there an alternative? Look through a list and if any of the words in the list is present in the string, it should pass.</p>
  
  <p>Eventually I am trying to see <code>If</code> it contains a month, <code>And</code> a day (number), <code>And</code> a year, <code>Then</code> ..<br>
  Using this method it seems to get "over complicated".</p>
  
  <p>Thanks in advance, R</p>