I have been trying this with a Transpose(Filter(),Filter()) and I can not get it to work properly.. I was wondering if there was a way to Transpose the headers from sheet1 over to a different sheet if they are checked for a certain department(C:CSpreadsheet here). This would then make the Headers a dynamic list on a separate sheet for each department similar to Job Title (B:B) on sheet1. (each department has its own sheet) Thank you in advance!
Instead of using formulas, what we can do is to use a script via Google Apps Script that should do the sorting of your users to their respective departments. To access the script editor directly from your spreadsheet, you can click on Extensions > Apps Script.
Some key points regarding the script:
You can use this sample script for your reference to see how it works:
function onEdit(e){
let range = e.range;
let col = range.getColumn();
let row = range.getRow();
let val = range.getValue();
let src = e.source.getActiveSheet();
// this checks the 1st column which contains the departments
// which will be the basis of the script to sort out the users based on their respective departments
if (col == 1 && val != ''){
let ss = SpreadsheetApp.getActiveSpreadsheet();
let sheet = ss.getSheetByName(src.getName());
let target = ss.getSheetByName(val);
let data = sheet.getRange(row,1,1,sheet.getLastColumn()).getValues();
target.appendRow(data[0]); // adds the user onto their new department sheet
sheet.deleteRow(row); // removes said user from the main sheet/their previous department's sheet
}
}
Once you have added this script, just save it and refresh your spreadsheet so that the changes will be applied, and the script will work automatically.