I am trying to copy only one column from a filtered raw file onto a working sheet. Both are sheets within the same spreadsheet.
I found this entry https://stackoverflow.com/a/52227279/17192498 which I updated for my specific sheet names. However, I do not want the entire raw file, only a specific column. How can I specify the range on the rawFile side to only be one column?
function filteredCopyTest (){
var sheet = SpreadsheetApp.getActive()
var rawFile = (sheet.getSheetByName('Raw'))
var masterRoster = (sheet.getSheetByName('Master Roster'))
var rawFileBranchFiltered = rawFile.getFilter().getRange()
rawFileBranchFiltered.copyTo(
masterRoster.getRange('AP2'),
SpreadsheetApp.CopyPasteType.PASTE_VALUES,
false);
}
Thank you in advance for the help!
I made a helper worksheet, and name it
filter_data_raw. You can hide this worksheet, and it will not affect anything in the code.The sample code: