title: if statement in excel, adding 1 if cell with text but
body: <p>I am creating an excel sheet that has three columns. Detail, month and month count</p>
  
  <p>1 -- I would like for the formula to look at the detail column and if there is text add the previous cell number plus 1 to new month count, if not insert 0   </p>
  
  <p>2-- I would like the formula to add the previous cell before the cell with 0 and for the cell with 0 not to impact the other cells or reset the cells back to 1 witch is the problem am having </p>
  
  <p>3-- I also need the formula to reset for every month from what ever number it was back to 0 or 1 depending if the new month first cell has text or not. for this I need the formula to look at the month column</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>=IF(ISTEXT(G95), I94+ 1, 0)
  </code></pre>