I can't set a variable to return the number to the last row under the K column in google sheets. The code fails on the last line .setValues(exampleText)
where I have already defined exampleText
as a variable.
I have used different methods of setting variables including setting a variable for a column.
I get the following error:
"Cannot find method getRange(number,number)."
The top three rows are an example I tried before.
Column = 'K'
range = ss.getRange(LastRow, Column)
range.setValue(exampleText)
var ss = SpreadsheetApp.getActiveSpreadsheet()
var column = 11
var lastRow = ss.getLastRow();
ss.getRange(lastRow, column)
.setValues(exampleText)
getRange(row,column)
type syntax only accepts numbers NOT strings. – TheMastergetRange(string)
is available onSpreadsheet
(ss). So, you can usess.getRange('Sheet1!A1:B4')
.getRange(number,number)
is only available on sheet.ss.getActiveSheet().getRange(1,4)
– TheMaster