Looking for an Excel Formula

Copper Contributor

Hello Everyone,

Khaledbarketi_0-1681217374607.png

I have 2 Colomns Supplier and Code . i need a formula that can change the position of a cell in colomn B if there is a duplication in colomn A.

The output of the formula should be like the 2nd table i have made it manually.

 

Thank you Guys :smiling_face_with_smiling_eyes:

 

3 Replies

@Khaledbarketi  The simplest of answers is something like =TRANSPOSE(FILTER(colB, colA=cellToTheLeft)) so assuming columns A, B for input and the output in col D (suppliers) and this formula in E2 then 

=TRANSPOSE(FILTER(B1:B100, A1:A100=D2))

and fill down

 

@Khaledbarketi 

Perhaps with REDUCE:

 

'Organize
=LAMBDA(a,v,LET(filtered, FILTER(Code, Supplier = v), IFERROR(VSTACK(a, HSTACK(v, TOROW(filtered))), "")))

=REDUCE({"Supplier","Code"},UNIQUE(Supplier),Organize)

 

Patrick2788_0-1681219742583.png