title: Using a formula with a range having a variable
body: <p>I have columns with a number of rows. I also have a module that counts certain cells when conditional formatting evaluates to true within the columns.</p>
  
  <p>I can use a formula such as </p>
  
  <p><code>=CountCFCells(A2:A201,README!$A$2)</code> </p>
  
  <p>and I get the correct result. However, I only want to examine the first X amount of rows (not all 201) I need to have a variable for the end row. I've defined NoR = 30 using the name manager and changed my formula to </p>
  
  <p><code>=CountCFCells("A2:A" &amp; NoR,README!$A$2)</code></p>
  
  <p>however, this returns an error. It appears that the variable is substituted into the formula, but the range is in double quotes like</p>
  
  <pre><code>=CountCFCells("A2:A30",README!$A$2)
  </code></pre>
  
  <p>I believe the double quotes around my range is causing the error. Does any one know a solution to this problem? Thank you</p>