'How to search for a value if exists or not in google sheets

I have two things:

  • category
  • section

I need to check if a specific section exist in specific category or not:

example: Result

How to get status result if Exists or Not?



Solution 1:[1]

try:

=INDEX(IF(A4:A="";;IF(IFNA(VLOOKUP(A4:A&B4:B; 
 FLATTEN(G3:H3&G4:H); 1; 0))=""; "none"; "exists")))  

Solution 2:[2]

Another option:

=INDEX(IF(LEN(A2:A),IF(COUNTIF(INDEX($F$2:$G,,MATCH(A2:A,$F$2:$G$2,0)),B2:B),"Exists","None"),))

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 player0
Solution 2 basic