Forum Discussion
Robobobob
Jul 19, 2023Copper Contributor
Matching cell values on 2 criteria
I have two separate sets of data that I'm trying to combine in to one. Sheet 1 has one row per person, and multiple columns for each of their responses to a question. Sheet 2 has multiple rows for ea...
sookoon
Jul 20, 2023Copper Contributor
Hi Robobobob
I think the more natural formula is to use FILTER. You Microsoft 365 or newer versions to have FILTER. My formula is something like below
=FILTER(Sheet2!C2:C9, (Sheet2!A2:A9=E2) * (Sheet2!B2:B9=F1),"")
Sheet1
Person | Qn | Answer |
Person 1 | Question 1 | 2 |
Person 1 | Question 2 | 3 |
Person 1 | Question 3 | 4 |
Person 1 | Question 4 | 5 |
Person 2 | Question 1 | 9 |
Person 2 | Question 2 | 1 |
Person 2 | Question 3 | 5 |
Person 2 | Question 4 | 6 |
Sheet2
Question 1 | Question 2 | Question 3 | Question 4 | |
Person 1 | 2 | 3 |
https://support.microsoft.com/en-au/office/filter-function-f4f7cb66-82eb-4767-8f7c-4877ad80c759