title: Add multiple ranges in same function in google sheets
body: <p>I've recently started writing simple functions for google sheets, and I'd like to extend the following function to all the ranges:
  D10:D12, H10:H12, D16:D18, H16:H18, D22:D24, H22:H24, D28:D30, H28:H30, D34:D36 and H34:H36.</p>
  
  <p>What's the syntax for what will go into the getRange parenthesis? </p>
  
  <pre><code>function nextRound() {
   var ss = SpreadsheetApp.getActiveSpreadsheet();
   var spreadsheet = SpreadsheetApp.getActive();
   var cell = spreadsheet.getRange("D10");
   var cellValue = cell.getValue();
  
    cell.setValue(cellValue - 1);
  }
  </code></pre>
  
  <p>As this function prperly works for cell D10, but if I change D10 to D10:D12, it will place the sale value from D10 -1 in the other two cells, and that's not what I want. When I run the function, I want the new value in D10 to be D10 - 1 (as it currently works), but the new value of D11 to be D11 - 1, etc.</p>
  
  <p>Oh, also, if possible, I'd like to add a second function to the button to clear the data from this same range of cells when one of the cells reaches 0 or negative numbers.</p>
  
  <p><a href="https://i.stack.imgur.com/U4Pu5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U4Pu5.png" alt="Example"></a></p>