Apr 11 2023 06:01 AM
Hello Everyone,
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
Apr 11 2023 06:09 AM
@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
Apr 11 2023 06:29 AM
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)