This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test_Error() | |
{ | |
var file = SpreadsheetApp.getActive(); | |
var sheet = file.getSheetByName('No Such Sheet!'); | |
var range = sheet.getRange(1, 1); | |
var value = range.getValue(); | |
Logger.log(value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
={"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ; ArrayFormula(VLOOKUP((ROW(INDIRECT("a1:a83"))-1)*7+TRANSPOSE(ROW(INDIRECT("a1:a7"))),{ROW(INDIRECT("a1:a588")),IF(TRANSPOSE(SPLIT(JOIN("",rept("0,",WEEKDAY(EOMONTH(A1,row(INDIRECT("a1:a12"))-2)+1))&REPT("1,",DAY(EOMONTH(A1,row(INDIRECT("a1:a12"))-1)))&rept("0,",49-DAY(EOMONTH(A1,row(INDIRECT("a1:a12"))-1))-WEEKDAY(EOMONTH(A1,row(INDIRECT("a1:a12"))-2)+1))),",")),MOD(ROW(INDIRECT("a1:a588"))-1,49)+1-VLOOKUP(CEILING(ROW(INDIRECT("a1:a588"))/49),{ROW(INDIRECT("a1:a12")),WEEKDAY(EOMONTH(A1,row(INDIRECT("a1:a12"))-2)+1)},2,),TRANSPOSE(SPLIT(rept(rept(" ,",42) & "Sun,Mon,Tue,Wed,Thu,Fri,Sat,",12), ",")))},2,)) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| | |
*/ | |
/* | |
_____ _ _ _ __ | |
| __ \ | | | | | | \ \ | |
| |__) |_ _ ___| |_ ___ | |__| | ___ _ __ ___ \ \ | |
| ___/ _` / __| __/ _ \ | __ |/ _ \ '__/ _ \ \ \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// please refer here for more info: | |
// https://sheetswithmaxmakhrov.wordpress.com/2018/01/03/smart-data-validation-create-dependent-drop-down-lists-in-goole-sheets/ | |
function onEdit(event) | |
{ | |
var maxRows = false; | |
// Change Settings: | |
//-------------------------------------------------------------------------------------- | |
var TargetSheet = 'Main'; // name of sheet with data validation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var C_RANGE_EVAL = 'eval'; | |
// Declare | |
var STR_DELIMEER1 // delim1 | |
var STR_DELIMEER2 // delim2 | |
var STR_IDS // files ids | |
var STR_SHEETS // sheet names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=ADDRESS(1,1,4,,"Sheet1")&":"&ADDRESS(COUNTA(Sheet1!A:A),COUNTA(Sheet1!1:1),4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function make2DDataValidation() { | |
// ............................... Settings ...................................... | |
// Sheet names | |
var tsheet = 'Sheet1'; // The name of the work sheet with data validation | |
var dsheet = 'data'; // The name of the data sheet | |
// The data validation range: | |
var rownum = 1000; // The number of the last row of validation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=ArrayFormula( | |
transpose(split(rept(concatenate(A2:A&char(9)),counta(B2:B)),char(9))) | |
&" "& | |
transpose(split(concatenate(rept(B2:B&char(9),counta(A2:A))),char(9))) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getDataElementsFromSheet() | |
{ | |
var sheet = SpreadsheetApp.getActiveSheet(); // get active sheet | |
var range = sheet.getDataRange(); // get range object containing data | |
var data = range.getValues(); // write range data into array called data | |
getDataElements(data); // To see the result run function and press <Ctrl + Enter> | |
} | |
function getDataElements(data) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getDataFromSheet() | |
{ | |
var sheet = SpreadsheetApp.getActiveSheet(); // get active sheet | |
var range = sheet.getDataRange(); // get range object containing data | |
var data = range.getValues(); // write range data into array called data | |
Logger.log(data); // Log Data. To see the result run function and press <Ctrl + Enter> | |
} | |