Match lists of items and get the elements matched in the same order

Hello all! I’m trying to adapt a routine (https://www.youtube.com/watch?v=6W78HpuBXUE) so that instead of referring to excel (as you can see below) the sheets automatically relate to the views (the views names, in this case, would be = the number of the board in which it will be inserted + name). The problem is that I struggling to match the lists and make the order of the lists the same (so that the views are positioned on the correct boards) … Does anyone have any suggestions on how this could work? Screenshot_2

1 Like

You can directly relate sheets to their names by using a dictionary. In your case, the keys would be the sheet number and the values would be the actual sheets. You can then use Dictionary.ValueAtKey assuming that there is a matching key. It looks like a few sheet numbers in the lower portion of your graph are not present in the upper portion (Sheets 101, 201, and 301, for example).

3 Likes

Hello @cgartland! Thanks for your Answer! So I tried with the dictionary, and all sheets that had matches were actually found!! (I haven’t yet made them all match, I just removed the nulls to see if the end of the routine would work by doing this way)!!
Thanks a lot