Andr
Andr

Reputation: 65

Check if value exists in multiple sheets

I have one excel with the following sheets

MAY
JUNE
JULY
AUGUST

Inside each sheet i have one column (A) with around 200 rows and in each cell I have a 6 digit number.

I would like to somehow in column (B) next to each number to check all sheets and if the number exists to return any text value for example "OK".

So if I write the number "000000" in Sheet JULY, Column A, line 67 and this number exists in Sheet MAY, Column A, line 120, I would like to see the word "OK" in Sheet JULY, Column B, line 67

What I have tried so far is:

=IFERROR(IF(MATCH(A2,MAY!$A:$A,0),"YES",),"NO")

But this one only checks one Sheet (MAY) I would like to have the option to check two or more Sheets.

Thanks

Upvotes: 0

Views: 3468

Answers (1)

Pspl
Pspl

Reputation: 1474

You're almost there. The formula you want is:

=IF(SUM(If(IFERROR(MATCH(A2,MAY!$A:$A,0),0)=0,0,1),If(IFERROR(MATCH(A2,JUNE!$A:$A,0),0)=0,0,1),…)<4,"No","Yes")

Please complete the formula with the others sheets you need or adjust it to your case.

Note that MATCH function will return a non null value is it finds a match. The Error catch IFERROR returns 0. So, if the any of the MATCHs fails, the SUM returns a number less than 4.

Upvotes: 0

Related Questions