I've got a pretty massive workbook that contains a little over 300 sheets. I'm trying to grab 2 cells from each sheet and move that data to master sheet. I'll create a sheet that is similar to my main buy smaller. Here is a test sheet
https://docs.google.com/spreadsheets/d/19DoIyBVFLCt7TU5PEZCMcFMCbRcXhKgNc3OBGcUPixk/edit?usp=sharing
Right now I have a script that does this but its completely inefficient, but I'm brand new to this. I have to do this set of code below for each sheet I have. So the code ends up being over 2000+ lines...
sheet.insertRowAfter(49);
var Date = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("SheetName").getRange("J16").getValues();
DateCell.setValue(Date);
NameCell.setValue("SheetName");
I'm looking for a script that will do what I have but in a loop of some sort. The way I have it is just wrong.