I have a table that list the tickets with a list of tests attached:
And I want to get the list of test with the tickets related to this test:
I'm using Excel Office 365 and the dynamics arrays, so for this example, I will have for the first entire array A1#.
Then, now I have the list of the tests by using this formula :
[in french]
=EXCLURE(TRIER(UNIQUE(DANSCOL(EXCLURE(tickets;;1)));;1);-1)
[in english]
=EXCLUDE(SORT(UNIQUE(BYCOL(EXCLUDE(A1#,,1))), 1), -1)
But I'm stuck on the generation of the second part to get the lists of the tickets by tests
I have tried the BYROW formula or the XLOOKUP, without success.
Is it possible to manage it only by formula?
4 Answers 4
Transform Data: Switch Values and Row Labels
- It is assumed that the initial row labels (
A1:A5) are distinct. - It is assumed that the initial values (
B1:D5) are distinct per row.
=LET(data,A1:D5,
sl,TAKE(data,,1),
sv,DROP(data,,1),
dl,UNIQUE(TOCOL(IFS(sv<>"",sv),2)),
dv,IFNA(DROP(REDUCE("",dl,LAMBDA(rr,r,
VSTACK(rr,TOROW(IFS(ISNUMBER(SEARCH(r,sv)),sl),2)))),1),""),
HSTACK(dl,dv))
Edit
- Mayukh Bhattacharya's first formula is more accurate (
SEARCHmight encounter false positives) and reducesTOROW(IFS(ISNUMBER(SEARCH(r,sv)),sl),2)toTOROW(IFS(sv=r,sl),2)in the formula above.
2 Comments
DANSLIGNE( SI.CONDITIONS( ESTNUM( RECHERCHE( r; sv)); sl );2) use DANSLIGNE(SI.CONDITIONS(sv=r;sl);2). To be able to use A1# (probably test), A1:D5 must be the result (spill) of another (array) formula.If it's not a large array, this mat suit your needs:
=LET(a,DROP(A1#,,1),L,LAMBDA(x,TOCOL(IFS(a>"",x),2)),TEXTSPLIT(CONCAT(BYROW(GROUPBY(L(a)&", ",L(TAKE(A1#,,1)),ARRAYTOTEXT,,0),CONCAT)&"|"),", ","|",1,,""))
3 Comments
Try using the following formula:
=TOROW(IFS(A7=B1ドル:D5,ドルA1ドル:A5ドル),2)
Also, if applicable using PIVOTBY()
=LET(
_a, B1:D5,
_b, TOCOL(IFS(_a<>"",A1:A5),2),
_c, SEQUENCE(ROWS(_b)),
_d, TOCOL(_a, 1),
DROP(PIVOTBY(_d, MAP(_d, _c, LAMBDA(x,y, SUM((_d=x)*(_c<=y)))), _b, SINGLE,,0,,0),1))
9 Comments
Another solution:
=IFNA(TEXTSPLIT(TEXTJOIN("*";FALSE;MAP(UNIQUE(TOCOL(B1:D5;1));
LAMBDA(x;TEXTJOIN("=";TRUE;x;IF(B1:D5=x;A1:A5;"")))));"=";"*");"")