I am new to coding! I have data in Sheet 1 of a Larger Spreadsheet that looks like this


and wish to change it to look like


I have tried to write a macro:

function Dated() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var range = sheet.getRange("ac7:ag24");
  var to_replace = ".";
  var replace_with = "/";
  replaceInSheet(sheet,range, to_replace, replace_with);

However, I get an error:

ReferenceError: "replaceInSheet" is not defined.

It is possibly quite simple but cannot solve it!

  • 1
    share a copy of your sheet – user0 Jul 2 '19 at 15:39
  • 1
    Welcome. replaceInSheet isn't a built-in Google Apps Script function, it should be declared somewhere. Have you wrote that function? – Rubén Jul 2 '19 at 22:59
  • you can use internal functions like:



  • or even internal formatting:


  • This doesn't replace the data in place, this adds a new column. – Rubén Jul 2 '19 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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