title: VBA finding whether a value exists in certain cells
body: <p>I'm trying to find if a value exists only in these particular cells. I've cobbled together the code from various sources and I can't seem to get it to work.</p>
  
  <pre><code>Resources = ActiveWorkbook.Sheets("Sheet1").Range("A1,A4,A6,A8,A10")
  MsgBox Application.WorksheetFunction.CountIf(Range(Resources, 0), "&gt;0")
  </code></pre>
  
  <p>I seem to get various errors depending on what <code>Dim</code> I set for the <code>Resources</code> variable and I'm not exactly sure what the <code>, 0</code> is for?</p>
  
  <p>Any help would be much appreciated.</p>