Forum Discussion

MLehm2502's avatar
MLehm2502
Copper Contributor
Jan 25, 2023

IMPORT TO NEW TABLE FROM EXISTING TABLE BASED ON CELL VALUE

Hi 

 

New in the community here. 🙂

 

Looking for a solution for the following, 

 

The column "VælgLand" has a list of values.

 

In another sheet there are a table, which i would like to import to the first mentioned sheet, based on the value of vælg land. I did get this "kind of" to work, but...

 

I want to import the specific lines from this table, that has value equal to "VælgLand" in 1 of the columns: Land, Land2 or Land3.

 

1. so if "VælgLand" is set to "Afghanistan" in Sheet 1

 

2. Any of the rows in this tabe that has the value "Aghanistan" in eather Land, Land2, or Land3...

 

Will be extracted from here...

 

To here...

 

Is this possible?

 

Hope you can help 🙂

3 Replies

  • MLehm2502 

    Could you please clarify why data shall be taken from this 4th row

    not form other ones, what are other criteria?

    And on which Excel platform/version you are?

     

    • MLehm2502's avatar
      MLehm2502
      Copper Contributor

      SergeiBaklan 

       

      It should import all rows, which has the value from VælgLand in 1 of these 3 columns.

       

       

      Lets say this table is a list of companies - and the columns "Land", "land2" and "land3" are the differencet contries they operate in.

       

      When i go the other sheet and choose lookup "afghanistan" i would like excel to import rows that has the value "afghanistan" in eather of the columns "Land", "land2" or "land3"

       

      Sorry for poor explanation.

       

      Also we work in Office 16

       

      SergeiBaklan 

      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        MLehm2502 

        If you have FILTER function you may return filtered data as

        =FILTER(Table2,
          (Table2[land]=A2)+
          (Table2[land1]=A2)+
          (Table2[land2]=A2))

Resources