# Arrayformula Lookup that matches 2 values

**URL:** <https://community.glideapps.com/t/arrayformula-lookup-that-matches-2-values/11028>\
**Category:** Ask for Help\
**Created:** [June 17, 2020, 2:50pm UTC](https://community.glideapps.com/t/arrayformula-lookup-that-matches-2-values/11028 "2020-06-17T14:50:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandro\_Brito](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sandro_brito/32/552_2.png) [@Sandro\_Brito](https://community.glideapps.com/u/Sandro_Brito)\
**Post date:** [June 17, 2020, 2:50pm UTC](https://community.glideapps.com/t/arrayformula-lookup-that-matches-2-values/11028/1 "2020-06-17T14:50:08Z")

</div>

Hey, guys.  
I’ve been away from glide for a little bit and came back to work on a project. For some reason it’s like starting from new.

I have the following sheets. Challenges and challengePlay respectively  
What I want to do is get the value of P1CollectibleID from the challengePlay into the P1CollectibleID in the Challenges sheet using array formula.  
The criteria is to get the P1CollectibleID that matches same ChallengeID and P1(email address)

 ![Screenshot 2020-06-17 at 15.34.42](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/5/533c9fb3ea5c05c3805e2c5a9cac3888d71156aa.png)  
 ![Screenshot 2020-06-17 at 15.34.23](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/1/10088d4792174a8307d6fe5b31c3699a77eace8d.png)

To give a bit of context, users challenge someone by creating a challenge, and then once the challenge is created both users can play. Challenges are created in the challenges sheet and their plays are created in the challengesPlay sheet.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 17, 2020, 2:56pm UTC](https://community.glideapps.com/t/arrayformula-lookup-that-matches-2-values/11028/2 "2020-06-17T14:56:48Z")

</div>

Hi Sandro, hope I can help.

An ARRAYFORMULA like this would work.

`=ARRAYFORMULA(VLOOKUP(A2:A&B2:B,{ChallengePlay!A2:A&ChallengePlay!B2:B,ChallengePlay!C2:C},2,FALSE)`

When you want to match 2 values, the idea is to join them in both sheets as a temporary column that only exists inside that formula.

---

<div class="post-metadata">

**Author:** ![Sandro\_Brito](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sandro_brito/32/552_2.png) [@Sandro\_Brito](https://community.glideapps.com/u/Sandro_Brito)\
**Post date:** [June 17, 2020, 3:34pm UTC](https://community.glideapps.com/t/arrayformula-lookup-that-matches-2-values/11028/3 "2020-06-17T15:34:00Z")

</div>

Thank you for your help.  
Unfortunately, it didn’t solve it.

Before I had a query that was “select C where (A = ‘“A2:A”’ and B = ‘“B2:B”’)” and it worked, but not inside the arrayformula.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 17, 2020, 3:34pm UTC](https://community.glideapps.com/t/arrayformula-lookup-that-matches-2-values/11028/4 "2020-06-17T15:34:47Z")

</div>

Can you send me a partial copy of your data or some dummy data that I can work on? What was the error you received?

Update: This issue was solved using the same method above so anyone with the same problem can go with that idea.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [February 25, 2024, 3:20pm UTC](https://community.glideapps.com/t/arrayformula-lookup-that-matches-2-values/11028/5 "2024-02-25T15:20:27Z")

</div>


