I'm following along with this basic tutorial, and my code looks similar, but I can't figure out why it's not working exactly. setValue inserts the value from A1 into each cell of the destination range, instead of inserting an array (nameRange) which Logger.log confirms is there.
https://www.youtube.com/watch?v=v1nvDkDY-3g
sheet1: basic sample data
colA colB colC
row1 Name Val1 Val2
row2 jake 2 3
row3 andrew 1 0
row4 allie 4 0
Script:
var app = SpreadsheetApp;
var activeSheet = app.getActiveSpreadsheet().getActiveSheet();
var lastRow = activeSheet.getLastRow();
function fillDownFormula(){
var nameRange = activeSheet.getRange(1,1,lastRow).getValues();
Logger.log(guideRange);
//shows [[Name], [jake], [andrew], [allie]]
activeSheet.getRange("D1:D5").setValue(guideRange);
//writes 'Name' to each cell in this range
}