title: Define formula of Countif in Excel VBA, not working
body: <p>I really appreciate if anyone could help; I've been working on this for a while...</p>
  
  <p>I just want to define the formula of countif in a cell, here is the code:</p>
  
  <p>Range("E" &amp; PLrowstart).Formula = "= CountIf($B$PLrowstart:$B$PLrowend" &amp; ",B2)"</p>
  
  <p>PLrowstart and PLrowend are integer variables I set before the line. The range for count if is range("B" &amp; PLrowstart &amp; ":B" &amp; PLrowend). I've also tried other ways, none worked... </p>
  
  <p>TIA.</p>