Comparing two lists

[Closed]
Report
-
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
-
Hello,
So I am really stupid, I need the exact code and where to put it.

I have two separate sheets

Sheet 1 has

1
2
3
4
5
6
7
8


Sheet 2 has

2
4
6
8

I need a way to locate all occurrences of sheet 2 in sheet 1

I need someone who can tell me the exact forumla to put in colum b or whatever to make the comparison

Steve

1 reply

Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
802
suppose your sheet 1 is like this
data
1
2
3
4
5
6
7
8

in B2 type this formula(or copy paste)

=IF(COUNTIF(Sheet2!$A$1:$A$4,Sheet1!A2)=1,"yes","no")

copy B2 down.

modify formula depending upon the configuration of sheet 2(particularly the item "Sheet2!$A$1:$A$4"