Forum Discussion
BORMAC
May 07, 2024Copper Contributor
Sorting with matching
I need to match the 2 ranges to each other. Find the cells on the right in the range on the left and put them in the right row. This is best shown in the image:
- May 08, 2024
BORMAC As a variant, without using LAMBDA helper functions:
=LET( rowId, XMATCH(B1:B10, E1:E5), HSTACK( EXPAND(A1:B10,, 3, ""), IF(ISNUMBER(rowId), INDEX(D1:E5, rowId, {1,2}), "") ) )Please see the attached workbook to convert the functions to your language settings...
BORMAC
May 08, 2024Copper Contributor
Dziękuję za pomoc.
Od razu przepraszam, ale zapomniałem o 1 ważnym punkcie:
W moim problemie tylko kolumny B i E zawierają te same wartości, które trzeba porównać.
Kolumny A i D mają różne wartości i należy je posortować razem z sąsiednią komórką.
djclements
May 08, 2024Silver Contributor
BORMAC As a variant, without using LAMBDA helper functions:
=LET(
rowId, XMATCH(B1:B10, E1:E5),
HSTACK(
EXPAND(A1:B10,, 3, ""),
IF(ISNUMBER(rowId), INDEX(D1:E5, rowId, {1,2}), "")
)
)
Please see the attached workbook to convert the functions to your language settings...
- BORMACMay 08, 2024Copper ContributorGreat!
Thank you very much - you solved my problem!