0

I have a Table like this in Sheet1

   A          B
1234.jpg |  c1
1234.jpg |  c2
1234.jpg |  c3
3456.jpg |  c8
3456.jpg |  c9
3456.jpg |  c10
haha.jpg |  c2
haha.jpg |  c5
haha.jpg |  c9

I need the to match the data according to the Columns in Sheet2 and the data should result something like this.

            c1  c2  c3  c4  c5
123.jpg     Y   Y   Y   N   N
3456.jpg    N   N   N   N   N
haha.jpg    N   Y   N   N   Y

I am currently only able to make out this

=IF(ISERROR(MATCH(A2,Sheet1!$A$1:$B$9,0)),"Y","N")

Which returns Y as long as A2 matches something from the array. How do I go about matching it as the Column in Sheet2? I'm open to using functions or VBA

1 Answer 1

2

Use following formula to D3 cell as per screenshot.

=IF(SUMPRODUCT(($A$2:$A$10=$C3)*($B$2:$B$10=D$2))=1,"Y","N")

enter image description here




.......................................................................................................................................................
You can also use this array formula.

=IF(ISNUMBER(MATCH($C3&D$2,$A$2:$A$10&$B$2:$B$10,0)),"Y","N")

Press CTRL+SHIFT+ENTER to evaluate the formula as it is an array formula.

enter image description here

After entering formula as array formula, drag and drop to right and down as you need.

Sign up to request clarification or add additional context in comments.

1 Comment

I realized that if there are 2 same values in column B for one jpg it would show as N instead. Anyway to resolve that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.