Forum Discussion

n-v-l's avatar
n-v-l
Copper Contributor
Nov 26, 2019
Solved

TEXTJOIN with and IF and extra VLOOKUP

Hi,

I'm trying to figure out if what I'm trying is possible at all or if I should try a different approach.

 

In short my issue:

I managed to create a TEXTJOIN formula with an IF that produces id's from a table (works perfect).

Now I'm trying to get values from a different table but have not succeeded (yet).

 

The formula I used for getting the id's lookes like this :

=TEKST.COMBINEREN(";";;ALS('pictures-to-items'!$A:$A=$A2;'pictures-to-items'!$B:$B;""))

 

it produces output like this : 1;2 or 6;7;8 etc. which are the id's in the table below.

 

Now I would like to replace the id's with values (the filenames) from a table that looks like this :

id | filename

1  | filename1

2  | filename2

 

Would this be possible using the formula I have now ?

 

Thanks for any tips and your time.

Nico

9 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    n-v-l 

    To imitate your model

    current formula in H2 is

    =TEXTJOIN(";",TRUE,IF(A:A=$G$2,B:B,""))

    and modification to return names

    =TEXTJOIN("; ",TRUE,IF(A:A=$G$2,IFNA(VLOOKUP(B:B,D:E,2,FALSE),""),""))

    Not very good from performance point of view, better to use with dynamic ranges.

    • n-v-l's avatar
      n-v-l
      Copper Contributor

      Hi SergeiBaklan ,

       

      Thank you very much for the example.

      I carefully tried to copy it into my "real" formula (first tab column E) and checked double for typo's but get a blank result.

      Can you spot where I made a mistake / thinking error ?

      I have attached a slimmed down version of my file I use.

      When I test the lookup separate it returns a value, after that I didn't know what else to test for.

       

      Thanks,

      Nico

Resources