SOLVED

# Return the matching value if two cells match

Copper Contributor

# Return the matching value if two cells match

I am looking to create a function that checks if two cells match, then return their matching value if true. A hypothetical depiction of this function is below:

 Does Link Work? (Reviewer 1) Does Link Work? (Reviewer 2) Hypothetical Result Yes Yes Yes Yes No NOT MATCHING Yes Yes Yes No No No

I can figure out whether they match, but can't seem to get to that extra step of grabbing the value shared between cells.

Previous tutorials cover entering data from a third cell, but not the values from the two cells that match. Thank you so much for any solutions or leads!

2 Replies
best response confirmed by justinbellpsy (Copper Contributor)
Solution

# Re: Return the matching value if two cells match

In C2:  =IF(A2<>B2,"NOT MATCHING",A2)

Fill down.

# Re: Return the matching value if two cells match

Amazing! Was not aware of the capabilities of IF here. Thanks so much!
1 best response

Accepted Solutions
best response confirmed by justinbellpsy (Copper Contributor)
Solution

# Re: Return the matching value if two cells match

In C2:  =IF(A2<>B2,"NOT MATCHING",A2)

Fill down.