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

Closed
Rachel - Sep 1, 2017 at 02:12 AM
Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 - Sep 1, 2017 at 10:27 AM
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 response

Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Sep 1, 2017 at 10:27 AM
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
0