# Comparing two different lists for the same values

**URL:** <https://forum.dynamobim.com/t/comparing-two-different-lists-for-the-same-values/11231>\
**Category:** Lists-Logic\
**Created:** [April 23, 2017, 10:19am UTC](https://forum.dynamobim.com/t/comparing-two-different-lists-for-the-same-values/11231 "2017-04-23T10:19:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marco1](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@marco1](https://forum.dynamobim.com/u/marco1)\
**Post date:** [April 23, 2017, 10:19am UTC](https://forum.dynamobim.com/t/comparing-two-different-lists-for-the-same-values/11231/1 "2017-04-23T10:19:45Z")

</div>

Dear forum,

I have a question related to list logic and I hope that someone here can help me.

I have 2 lists containing Revit elements,I want to compare them and create a third list containing all the elements that are present in list 1 and 2. The main problem is that the lists are with different lengths and that the elements are randomly sorted in the both lists. Does anybody have some advice for me? Thanks a lot.

---

<div class="post-metadata">

**Author:** ![rexfrancojesse](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/rexfrancojesse/32/24664_2.png) [@rexfrancojesse](https://forum.dynamobim.com/u/rexfrancojesse)\
**Post date:** [April 23, 2017, 10:30am UTC](https://forum.dynamobim.com/t/comparing-two-different-lists-for-the-same-values/11231/2 "2017-04-23T10:30:20Z")

</div>

Have you tried ‘SetIntersection’ node? Can you give a screenshot of your current dynamo definition?  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/7/a78292fe102d0092058ec3af14d91a70f2fcbe15.PNG)

---

<div class="post-metadata">

**Author:** ![marco1](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@marco1](https://forum.dynamobim.com/u/marco1)\
**Post date:** [April 23, 2017, 1:00pm UTC](https://forum.dynamobim.com/t/comparing-two-different-lists-for-the-same-values/11231/3 "2017-04-23T13:00:06Z")

</div>

yes, this is exactly what I was looking for. I didn;t know that there was a node for this. Thank you very much 🙂

---

<div class="post-metadata">

**Author:** ![theshysnail](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/theshysnail/32/146653_2.png) [@theshysnail](https://forum.dynamobim.com/u/theshysnail)\
**Post date:** [January 23, 2020, 7:10am UTC](https://forum.dynamobim.com/t/comparing-two-different-lists-for-the-same-values/11231/4 "2020-01-23T07:10:52Z")

</div>

Hi,  
What if the list 2 (smaller list) contains some repeating items and I want all the items from list 1 which are common in both?
