# Search larger list for matches in smaller list

**URL:** <https://forum.dynamobim.com/t/search-larger-list-for-matches-in-smaller-list/69266>\
**Category:** Lists-Logic\
**Created:** [October 13, 2021, 5:38pm UTC](https://forum.dynamobim.com/t/search-larger-list-for-matches-in-smaller-list/69266 "2021-10-13T17:38:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Redrunner262](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/redrunner262/32/118682_2.png) [@Redrunner262](https://forum.dynamobim.com/u/Redrunner262)\
**Post date:** [October 13, 2021, 5:38pm UTC](https://forum.dynamobim.com/t/search-larger-list-for-matches-in-smaller-list/69266/1 "2021-10-13T17:38:20Z")

</div>

I have a list of sheet numbers in my project and a list of sheet numbers in an Excel file. I want to create new sheets with sheet numbers not already in the project and bypass creating sheets with existing numbers. As such I want to filter the first list by the second list. I found [this](https://forum.dynamobim.com/t/list-contains-with-two-lists-of-different-lengths/32795) page in which the solution is to use the List.Contains node. However, this node is not working the way I expect it to work in my graph. How do I create such a filter of one list by another?

My graph and its results below. Notice that sheet numbers A8.1 through A8.3 are in both lists but have different indices (34-36 in the top list, 32-34 in the bottom list). In spite of their presence in both lists, the List.Contains node returns “false” for indices 34-36, which I thought would be “true”.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/0/50c4eecf26051e043e9da7c43e143644af01531a.png)

---

<div class="post-metadata">

**Author:** ![EdsonMatt](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/edsonmatt/32/124725_2.png) [@EdsonMatt](https://forum.dynamobim.com/u/EdsonMatt)\
**Post date:** [October 13, 2021, 6:09pm UTC](https://forum.dynamobim.com/t/search-larger-list-for-matches-in-smaller-list/69266/2 "2021-10-13T18:09:49Z")

</div>

What if you change the level structure of the item to @L1 and the lacing to “auto”?

![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/e/cea7f9b90d212079a1fdaa2d96607c7bcbaacea3.jpeg)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [October 13, 2021, 6:18pm UTC](https://forum.dynamobim.com/t/search-larger-list-for-matches-in-smaller-list/69266/3 "2021-10-13T18:18:54Z")

</div>

Make sure you don’t have any trailing spaces. Someone else had that problem earlier in the week.

---

<div class="post-metadata">

**Author:** ![Redrunner262](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/redrunner262/32/118682_2.png) [@Redrunner262](https://forum.dynamobim.com/u/Redrunner262)\
**Post date:** [October 13, 2021, 6:29pm UTC](https://forum.dynamobim.com/t/search-larger-list-for-matches-in-smaller-list/69266/4 "2021-10-13T18:29:26Z")

</div>

Good thought. I’ve learned to trim these in Excel. So in this case there are no trailing spaces.

---

<div class="post-metadata">

**Author:** ![Redrunner262](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/redrunner262/32/118682_2.png) [@Redrunner262](https://forum.dynamobim.com/u/Redrunner262)\
**Post date:** [October 13, 2021, 6:30pm UTC](https://forum.dynamobim.com/t/search-larger-list-for-matches-in-smaller-list/69266/5 "2021-10-13T18:30:17Z")

</div>

That is it. I’m still learning how the Auto lacing setting works. Seems to be a hybrid function. Thanks!

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/c/ec60d0633c1e1071407b1a466b20b4ba46808812.png)
