title: Increment total by one when cell value changes
body: <p>I thought this was simple but I'm stumped: I have three columns, User Name, Hit counter, and Total Hits. Hit counter will have either a 0 or a 1 while Total Hits will count the total number of times column Hit Counter ever contains a 1.</p>
  <p>The idea is if someone changes a 0 to a 1, then the adjacent cell in B should increase by 1. There is no change if someone changes that 1 back to a 0, but if someone else comes in and changes 0 back to 1, then total should continue to increase by one.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Hit Count</th>
  <th>Hit counter</th>
  <th>Total hits</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Test1</td>
  <td>0</td>
  <td>1</td>
  </tr>
  <tr>
  <td>Test2</td>
  <td>1</td>
  <td>3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>In the above table, if someone changes Test1 hit counter to 1, then Total hits should go up to 2. If someone changes that to 0 and then 1 again, it should go up to 3.</p>
  <p>Is there a way to do this with formula's and not Apps Script or code? If not, how would I do this in code or Apps Script?</p>
  <p>Thanks!!</p>