I
I
Ieskelahsydyv2021-11-11 10:49:41
excel
Ieskelahsydyv, 2021-11-11 10:49:41

Multiple VLOOKUP in one cell over part of text?

Every day I face the routine task of selecting replacement numbers.

There is an original table with all possible articles without duplicates.

There is a second table in which there are replacements.
How to make a general table with 2 columns ARTICLE and REPLACEMENT, in the second column display, without duplicates, all possible replacement options.

АРТИКУЛ          ЗАМЕНА                                       АРТИКУЛ ЗАМЕНА
A001                  A001/A002                                     A001 A002/A003/A009/A010
A002                  A002/A003                                     A002 A001/A003/A009/A010
A003                  A003                                              A003 A001/A002/A009/A010
A004                  A004/A005/A006/A007                  A004 A005/A006/A007/A008
A005                  A00555                                          A005 A004/A006/A007/A008
A006                  A006                                              A006 A004/A005/A007/A008
A007                 A007/A008                                    A007 A004/A005/A006/A008
A008                 A008                                              A008 A004/A005/A006/A007
A009                 A009/A010/A001                           A009 A001/A002/A003/A010
A010                 A010                                              A010 A001/A002/A003/A009


Help solve the problem, because went through all the possible options, no result.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Boev, 2021-11-11
@Ieskelahsydyv

In Excel in VBA, it is possible to do something similar.
In Google spreadsheets, there is a chance to get by with formulas, although it is easier to make a custom function there.

on the formulas it looks creepy, and you can make a mistake at once. Formula for 3 iterations

=join(
        "/"
        ;ТРАНСП(unique(
                ТРАНСП(split(
                        join(
                                "/"
                                ;ArrayFormula(
                                        ЕСЛИОШИБКА(
                                                ВПР(
                                                        split(
                                                                join(
                                                                        "/"
                                                                        ;ArrayFormula(
                                                                                ЕСЛИОШИБКА(
                                                                                        ВПР(
                                                                                                split(
                                                                                                        ВПР(A1;FILTER(A:B;A:A<>"");2;0)
                                                                                                        ;"/"
                                                                                                )
                                                                                                ;FILTER(A:B;A:A<>"")
                                                                                                ;2
                                                                                                ;0
                                                                                        )
                                                                                        ;split(
                                                                                                ВПР(A1;FILTER(A:B;A:A<>"");2;0)
                                                                                                ;"/"
                                                                                        )
                                                                                )
                                                                        )
                                                                )
                                                                ;"/"
                                                        )
                                                        ;FILTER(A:B;A:A<>"")
                                                        ;2
                                                        ;0
                                                )
                                                ;split(
                                                                join(
                                                                        "/"
                                                                        ;ArrayFormula(
                                                                                ЕСЛИОШИБКА(
                                                                                        ВПР(
                                                                                                split(
                                                                                                        ВПР(A1;FILTER(A:B;A:A<>"");2;0)
                                                                                                        ;"/"
                                                                                                )
                                                                                                ;FILTER(A:B;A:A<>"")
                                                                                                ;2
                                                                                                ;0
                                                                                        )
                                                                                        ;split(
                                                                                                ВПР(A1;FILTER(A:B;A:A<>"");2;0)
                                                                                                ;"/"
                                                                                        )
                                                                                )
                                                                        )
                                                                )
                                                                ;"/"
                                                        )
                                        )
                                )
                        )
                        ;"/"
                ))
        ))
)


Demo table

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question