0

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

25.06.18 

and wish to change it to look like

26/06/18 

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 at 15:39
  • 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 at 22:59
-1
  • you can use internal functions like:

    =ARRAYFORMULA(SUBSTITUTE(AC7:AG24, ".", "/"))

    =ARRAYFORMULA(REGEXREPLACE(AC7:AG24, ".", "/"))

  • or even internal formatting:

    0

  • This doesn't replace the data in place, this adds a new column. – Rubén Jul 2 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.