# Formula: Get the common entities between 2 collections

**URL:** <https://community.fibery.io/t/formula-get-the-common-entities-between-2-collections/2213>\
**Category:** Get Help\
**Created:** [November 11, 2021, 1:25pm UTC](https://community.fibery.io/t/formula-get-the-common-entities-between-2-collections/2213 "2021-11-11T13:25:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![v3j](https://avatars.discourse-cdn.com/v4/letter/v/f07891/32.png) [@v3j](https://community.fibery.io/u/v3j)\
**Post date:** [November 11, 2021, 1:25pm UTC](https://community.fibery.io/t/formula-get-the-common-entities-between-2-collections/2213/1 "2021-11-11T13:25:17Z")

</div>

Is there a formula for extracting the common entities between 2 collections?  
  
e.g  
  
Input -  
A: red, orange, blue, green  
B: yellow, pink, red, blue  
  
Desired Output -  
C: red, blue  
  
Also, the other way around   
  
A: red, orange, blue, green  
B: yellow, pink, red, blue  
  
Desired Output -  
C: yellow, pink, orange, green

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [November 11, 2021, 5:52pm UTC](https://community.fibery.io/t/formula-get-the-common-entities-between-2-collections/2213/2 "2021-11-11T17:52:46Z")

</div>

When you say ‘collection’ do you mean multi-select options or related entities (or even something else)?

In your example, are A and B two separate entities, or are they two collections in the same entity?

---

<div class="post-metadata">

**Author:** ![v3j](https://avatars.discourse-cdn.com/v4/letter/v/f07891/32.png) [@v3j](https://community.fibery.io/u/v3j)\
**Post date:** [November 12, 2021, 12:28am UTC](https://community.fibery.io/t/formula-get-the-common-entities-between-2-collections/2213/3 "2021-11-12T00:28:09Z")

</div>

Thanks for asking Chris! I mean related entities 🙂

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [November 12, 2021, 9:16am UTC](https://community.fibery.io/t/formula-get-the-common-entities-between-2-collections/2213/4 "2021-11-12T09:16:21Z")

</div>

And what are A and B (and C) in your example?
