title: Calculating percentage using VBA
body: <p>I need to calculate the percentage for the below code. </p>
  
  <p>Cell AE43 gives the total count out.</p>
  
  <p>Cell AE51 gives valid count.</p>
  
  <p>Cell AE53 should hold the % for this.</p>
  
  <pre><code>Sub WBR()
  Dim Count1Criteria As Variant
  Dim Count3Criteria As Variant
  Dim test As Variant
  Dim wf As WorksheetFunction
  Set wf = Application.WorksheetFunction
  
  Filter1InSummary = Array(Array("AE4", "Latency", "O:O", "Pass"), _
                           Array("AE51", "TT", "G:G", "Yes"), _
                           Array("AE52", "TT", "G:G", "No"), _
                           Array("AE61", "Reactive", "R:R", "Item"))
  
  Filter3InSummary = Array(Array("AE43", "TT", "I:I", "&lt;&gt;Duplicate TT", _
                                               "G:G", "&lt;&gt;Not Tested", _
                                               "U:U", "Item"))
  For Each test In Filter3InSummary
      With Worksheets(test(1))
          Range(test(0)) = wf.CountIfs(.Range(test(2)), test(3), _
                                       .Range(test(4)), test(5), _
                                       .Range(test(6)), test(7))
      End With
      Next
  </code></pre>