I am wondering if there is a way to auto select the cell range based on selected filter.
- Set Filter in (Column H)
- Auto select the result cell data starting Column A (A2000): Column C (C5000) etc. --- This is where I am getting stuck. I do not know how to write to auto select the result cell data based on the selected filter.
Currently, my workout is to manually enter the cell so I could move on with writing the codes. I hope I am making sense above.
---- Code----
function ColHtoActive() {
var ss = SpreadsheetApp.getActive();
var sheet = ss.getSheetByName('Current');
var crange = sheet.getRange('A7:I7350').activate();
var currentCell = sheet.setCurrentCell(sheet.getRange('H7');
var hSfilter = sheet.getRange('A7:I7350').createFilter();
var ccC1 = sheet.getRange('H7').activate();
var cCriteria = SpreadsheetApp.newFilterCriteria().setHiddenValues('Inactive']).build();
sheet.getFilter().setColumnFilterCriteria(8, cCriteria);
}
function copycolA() {
var ss = SpreadsheetApp.getActive().getSheetByName('A');
ss.getRange('A2307').activate();
ss.getRange('A2307:A7155').copyTo(
ss.getActiveRange(),
SpreadsheetApp.CopyPasteType.PASTE_NORMAL,
false);
}
