title: How to auto select range from a filter without having to manually enter it?
body: <p>I am wondering if there is a way to auto select the cell range based on selected filter.</p>
  <p>Example:
  <a href="https://i.stack.imgur.com/65i0G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/65i0G.png" alt="Sample" /></a></p>
  <ul>
  <li>Set Filter in (Column H)</li>
  <li>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.</li>
  </ul>
  <p>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.</p>
  <p>---- Code----</p>
  <pre><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);
  }
  </code></pre>