'If Cell A in Column A is equal to any Cell in Column B, Input the number "5"

I have a list of emails on two separate sheets, I want to a formula that will allow me to able to automatically input the number "5" in a column where a match was found.

If Cell A in column A is = to a value in column B then input the number 5 in column C on the same row as Cell A

What I want is essentially the same thing as a VLookup only instead of returning a value from another cell I just want when it finds a match to input the number 5



Solution 1:[1]

try:

=ARRAYFORMULA(IF(COUNTIF(B:B; A:A)>0; 5; ))

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