title: Is there a way to AND across a row of a 2D Array?
body: <p>Using VBA, I would like to AND across each row in a 2D array and star the result in separate 1D array without ANDing a single pair the ANDing the result with the next item in that row.</p>
  <p>FYI This is my first time using 2D arrays so sorry if there is an obvious solution.</p>
  <p>For example if the data in my sheet looked like this (the actual range is much larger):</p>
  <p><a href="https://i.stack.imgur.com/UmnOC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UmnOC.png" alt="enter image description here" /></a></p>
  <p>I would like to do the equlavant of an excel formula: =AND(B2:D2) then =AND(B3:D3), etc...</p>
  <p>I have code that sets everything up but I don't know how to proceed except to loop across each element of a row, store the result then loop across the next, etc, etc. I'm hoping the there is a much better (more efficient) way to proceed.</p>
  <p>Here is my code so far</p>
  <pre><code>Sub Exceptions()
      ' Setup worksheet
      Dim wks As Worksheet
      Set wks = cnTest
          
      ' Find last row of range
      Dim LastRow As Long
      LastRow = Find_LastRow(wks)   'Functionthat returns last row
               
      ' load range into array
      Dim MyArray As Variant
      MyArray = wks.Range(&quot;B2:D8&quot;)
      
      ' Setup 1D Result array
      Dim Results As Variant
      Results = wks.Range(&quot;A2:A8&quot;)
      
  
      Dim i As Long
      For i = 1 To LastRow
          ' Perform AND function on each row of the array
          ' then place result in 1D array (Results())
          ' If this were a formul: =AND(B2:D2)
          '
          ' Is there way to &quot;AND&quot; across a row in and array or
          ' must I &quot;AND&quot; MyArray(1,1) with MyArray(1,2) then AND
          ' that result with MyArray(1,3)
      Next i
            
  End Sub
  </code></pre>
  <p>Thank you</p>