title: excel check whether a combination of cells in a row exists in a range
body: <p>I've looked around and I can't find it.</p>
  
  <p>So lets say I have an array of these unique strings:</p>
  
  <pre><code>Dim uniques(10) As String
  </code></pre>
  
  <p>Now each of these Strings are represented in the A column on the spreadsheet.</p>
  
  <p>Also I have a range of Integers going from 1 - 365 representing unique values in column B. The ith day i</p>
  
  <p>My conundrum is:
  I want to know whether there exists a row where A is uniques(1) and b is i
  and I want to itterate this process through all uniques and all possible i's</p>
  
  <p>I'm looking for an efficient way to do this, anything better than looping through the range in question, for each unique, for each day.
  For the record my actual data is counting every day of the year and the number of days since a certain event has happened so my number of rows can grow as large as 365^2 and maybe even more if the event happened more than a year ago.</p>
  
  <p>COUNTIFS seems to work pretty good. I wish I I could just go:</p>
  
  <pre><code>numOfOccurences = Sheet1.Countifs(countrange,dayrange,uniques(1),irange,i)
  </code></pre>
  
  <p>And if numOfOccurences is greater than 0 then I know it exists.</p>
  
  <p>Or is there a function that breaks a Range into rows in a vba array?
  So that it looks like this {[A2,B2],[A3,B3],...} I could do some damage with that because both the columns come sorted, A then B. I'm just not looking forward to making the function myself.</p>
  
  <p>All ideas are appreciated</p>