custom-function

How to call library function as custom function from spreadsheet formula?

生来就可爱ヽ(ⅴ<●) 提交于 2020-08-26 09:47:25
问题 This might be the same root cause as in How to call a library function from a spreadsheet drop-down menu generated by the same library, but I still wanted to throw it out there in case there was something new or somehow the situation was different. The thing is that I want to keep all my custom functions in a library, then add the library to any given spreadsheet, and be able to reference them from a cell formula. In the library: /** * Returns the parameter * Eg: (16) to 16 * * @param {object

Is there a faster way to refresh all of my custom formulas?

时光总嘲笑我的痴心妄想 提交于 2020-08-17 06:00:09
问题 I need to refresh all of my custom formulas via a script in Google Sheets but this seems to take forever (like, 30 seconds for 100 cells). There will potentially be thousands of cells with my custom formula so I must come up with a better way. I have: function refresher(){ var sheet = SpreadsheetApp.getActiveSheet(); var selection = sheet.getDataRange(); var columns = selection.getNumColumns(); var rows = selection.getNumRows(); for (var column=1; column <= columns; column++){ for (var row=1;

How to call a Google Sheet formula from within a custom function?

拥有回忆 提交于 2020-07-10 03:19:18
问题 Is it possible to call any of the Google Sheets formulas from within your own Google Apps script custom function? If so, how? It obviously doesn't work to merely use the formula name like you would inside the sheet. Like this, which is what I was hoping would work: function myCustomFunction() { return TDIST(1,30,1); // calling =myCustomFunction() does not work due to TDIST giving a ReferenceError, even though =TDIST(1,30,1) works inside the spreadsheet } But since Google's built-in formulas

How to call a Google Sheet formula from within a custom function?

▼魔方 西西 提交于 2020-07-10 03:18:55
问题 Is it possible to call any of the Google Sheets formulas from within your own Google Apps script custom function? If so, how? It obviously doesn't work to merely use the formula name like you would inside the sheet. Like this, which is what I was hoping would work: function myCustomFunction() { return TDIST(1,30,1); // calling =myCustomFunction() does not work due to TDIST giving a ReferenceError, even though =TDIST(1,30,1) works inside the spreadsheet } But since Google's built-in formulas

How to count the number of cells which contain specific text using Google Sheet Scripts?

谁说我不能喝 提交于 2020-07-03 13:00:40
问题 How to count the number of cells which contain specific text using Google sheet scripts? Currently I'am using the following script to count the number of cells which contain specific text, for example cells which contain: 'Complete' or 'Not Complete'. function COUNT_TEXT_ACROSS_SHEETS(sheetNames, range, text) { sheetNames = sheetNames.split(','); var count = 0; sheetNames.forEach(function(sheetName) { var sheet = SpreadsheetApp.getActive().getSheetByName(sheetName); var values = sheet

How to count the number of cells which contain specific text using Google Sheet Scripts?

偶尔善良 提交于 2020-07-03 13:00:08
问题 How to count the number of cells which contain specific text using Google sheet scripts? Currently I'am using the following script to count the number of cells which contain specific text, for example cells which contain: 'Complete' or 'Not Complete'. function COUNT_TEXT_ACROSS_SHEETS(sheetNames, range, text) { sheetNames = sheetNames.split(','); var count = 0; sheetNames.forEach(function(sheetName) { var sheet = SpreadsheetApp.getActive().getSheetByName(sheetName); var values = sheet