title: Creating a button in google sheets to transfer a cell value to the cell next to it
body: <p>I am managing a sheet to track delivery schedules.
  The sheet contains two dates for each delivery entry: 1) this week's delivery date, and 2) the next delivery date</p>
  
  <p>When delivery is complete, I want "the next delivery date" to replace the date that is in "this week's delivery date", thereby updating the delivery schedules.</p>
  
  <p>For example, if column A is "this week's delivery date" and column B is "next upcoming delivery date", I want to move the date in column B to column A upon clicking a button.</p>
  
  <p>Also, I am having difficulties with adding a certain number of days to the date in a cell. 
  I tried to use the function belo to add 7 days to the date with failed delivery, but it seems adding the number 7 in apps script does not mean adding 7 days in the corresponding cell.</p>
  
  <p>I used this:</p>
  
  <pre><code>function transferfail(){
  
    var cell = SpreadsheetApp.getActiveSheet().getRange("J4");
    var cellValue = cell.getValue();
  
    cell.setNumberFormat("yyyy. M. d").setValue(cellValue + 7);
  }
  </code></pre>