Home > other >  How can I separate people per groups on Google Sheets
How can I separate people per groups on Google Sheets

Time:09-23

I hope you are doing great! I hope someone could help with this.

I have 2 groups of people "A" and "B"

groups of people

both groups work on the same tasks

tasks assigned to people

but I would like to get them with an "@" on a different sheet; separated into groups (group A and B) and both groups mixed (general)

People per group and general result

Does anyone know how can I automatically separate them into groups A and B? I was wondering if I could use a match formula and an if formula, I tried to do it but had no success. The task can vary but no the group so the best would be to get formula or any way to automatically add thee people per group.

As an additional info I used this formula to get the general result: =IFNA(JOIN(", ";QUERY('Sheet 1'!A3:E12 ;"select A where B = TRUE";0));"")

This is the Google sheet I've been using to try to do this:

enter image description here

B17:

=ARRAYFORMULA(TRIM(FLATTEN(QUERY(TRANSPOSE(XLOOKUP(SPLIT(B3:B6; "@ "); 
 IF('Sheet 3'!C3:C12; 'Sheet 3'!A3:A12; ); "@"&'Sheet 3'!A3:A12;;; 1));;9^9))))

enter image description here

CodePudding user response:

Simply replace the opposing group in general category using enter image description here

=ArrayFormula(IFERROR({ SPLIT('Sheet 3'!B1&" "&'Sheet 3'!B2&", " ; ",");
                TRANSPOSE({  'Sheet 1'!B2:E2;
                             BYCOL(IF(FILTER('Sheet 1'!B3:E; 'Sheet 3'!B3:B=TRUE)<>TRUE;;"@"&'Sheet 1'!A3:A); 
                             LAMBDA(v; TEXTJOIN(" "; 1;v)))}) };""))

enter image description here

=ArrayFormula(IFERROR({ SPLIT('Sheet 3'!B1&" "&'Sheet 3'!C2&", " ; ",");
                TRANSPOSE({  'Sheet 1'!B2:E2;
                             BYCOL(IF(FILTER('Sheet 1'!B3:E; 'Sheet 3'!C3:C=TRUE)<>TRUE;;"@"&'Sheet 1'!A3:A); 
                             LAMBDA(v; TEXTJOIN(" "; 1;v)))}) };""))

enter image description here

Functions used
ARRAYFORMULA - TRANSPOSE - BYCOL - IF - LAMBDA - TEXTJOIN

  • Related