Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

As per the title, I want to "move" the contents of a cell one column to the right once a week, specifically Sunday at 11pm

Must I use a script for that?

share|improve this question
    
What have you already tried? We're happy to try to help you (and future readers) but we're not a code-generating service. I suggest you read up at our help center. –  Al E. Sep 9 '13 at 19:29
    
Thanks, understood –  Drewdavid Sep 9 '13 at 22:29

1 Answer 1

up vote 0 down vote accepted

This piece of script will move the first entry of a row range to the next column:

Code

function myShift() {
  var sh = SpreadsheetApp.getActiveSheet();
  var data = sh.getRange("1:1").getValues();
  var counter=0;
  for(var i=0, iLen=data[0].length; i<iLen; i++) {
    if(data[0][i] == "") {
      counter++;
    } else {
      data[0][counter+1] = data[0][i];
      data[0][counter] = "";
      break;
    }
  }
  sh.getRange("1:1").setValues(data);
}

Trigger

enter image description here

Example

I've created an example file for you: Copy and Paste Cell Contents Once a Week

Explained

Add the script under Script Editor from the Tools menu. Press the "bug" button to debug the code and to authenticate the script. Goto Resources (in the script editor) and set the trigger as shown.

share|improve this answer
    
Hi and thank you - I updated the example file to reflect more accurately my usage. Specifically I want to move all column B entries to column C, from rows 2 down. :) So once a week Bs value goes to C and B is left empty and is ready to receive the data for the current week... could you perhaps advise on the necessary script changes to be made? –  Drewdavid Sep 16 '13 at 22:32
    
@Drewdavid I don't want to be a spoiler, but that's a different question that needs a different approach. Please ask this question in detail again and I (or somebody else) will respond to that. –  Jacob Jan Tuinstra Sep 17 '13 at 8:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.