2
votes

I'm struggling to figure out a way how to format a Google Sheets cell in a particular way.

I need the cell to have date formatting (to have the dropdown date picker) and the date has to be formatted like this: Dayofweek, (new line) dd.mm.yyyy.

So for example:

Wednesday,

15.03.2017.

I can't figure out how to add the new line part: Google Sheets Date Formatting Example

Format -> Text wrapping -> Wrap doesn't work for some reason. Do Google Sheets have a new line character, or perhaps it could be done using a particular function?

1

1 Answers

0
votes

try using script:

function setFormat() {
  var file = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = file.getSheetByName('Sheet1');
  var range = sheet.getRange(1, 1);
  range.setNumberFormat('dddd,dd.mm\nyyyy');
 }

\n is a new line before year yyyy