I have 10 tabs with names that keep changing as job finishes with each one. So am using an array to find sheets.

Master sheet needs to display values from same Column in All 10 Tabs AF3:AF

This code can only return a value from 1 cell - not a range.

```
function MasterTotals() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet1 = ss.getSheetByName('Master Sales');
var sheet = ss.getSheets()[5,6,7,8,9,10,11,12,13,14];
var value = sheet.getRange('AF3:AF').getValue();
sheet1.getRange('AM2:AM').setValue(value); 
so [5] should return answer to AM2 - [6] should return answer to AM3 etc etc

Error returned is **cannot read property getRange**

Appreciate any help on what I am not seeing

```

[![enter image description here](https://i.stack.imgur.com/FtaCr.png)](https://i.stack.imgur.com/FtaCr.png)