Did you like how we did? Rate your experience!

4.5

satisfied

46 votes

In Google Spreadsheets, how can you loop through all available sheets?

If youre able to use macro, you can do the following. Add this script to your spreadsheet (Tools -> Scripts -> Script editor): function getTotalSum(cell) { var sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets(); var sum = ; for (var i = ; i < sheets.length ; i++ ) { var sheet = sheets[i]; var val = sheet.getRange(cell).getValue(); if (typeof(val) == 'number') { sum += val; } } return sum; }

100%
Loading, please wait...