I have a spreadsheet A which is the source of data and spreadsheet B where this data should be put to. The data needs to be transposed, but there's also a number of conditions like Month, Name and Attribute. So there's 3 matching parameters to meet(Name, Month, Attribute). And this is what I can't get my head around.
This is the code I've come up with, but it's no good since the transpose function doesn't work at all. And how to apply matching to this code is hard for me.
function transpose()
var sourcess = SpreadsheetApp.openById();
var sourcesheet = sourcess.getSheetByName();
var sourcerange = sourcesheet.getRange((row2col()));
var sourcevalues = sourcerange.getValues();
var ss = SpreadsheetApp.getActiveSpreadsheet();
var destsheet = ss.getSheetByName();
var destrange = destsheet.getRange();
destrange.setValues(sourcevalues);
function row2col(row) {
return row[0].map(function(elem) {return [elem];});
Any help is very much appreciated. Here is a test file of what this should look like