How to look up a value within only a subset of another column? [Closed]

Report
-
Posts
1842
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
October 27, 2020
-
Hello,

Thanks in advance for any help!

This is my data:

X 1 3
X 2 4
Y 1 5
Y 5 4
Y 3 2

And I want to know, does the value in C1 ('3') appear anywhere in column B (second column) where the values in column A also match. So the answers are No No Yes No No - only number 5 appears in both columns B and C where the value in column A also matches (=Y)

How can I do this?

1 reply

Posts
1842
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
October 27, 2020
136
Rachel, Good morning.

Suppose yoUr data at A1:C5

Try do use:

D1 --> =IF(COUNTIFS($A$1:$A$5,A1,$B$1:$B$5,C1)=0,"No","Yes")

Copy it down.

Is that what you want?
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão