Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How Can I Compare Two Columns and Return the Matched Values in a Single Cell?

This question addresses a similar question, however it only returns the first matched value into the cell.

Their proposed formula was:

=INDEX($A$1:$A$5,MATCH(TRUE,COUNTIF($B$1:$B$5,$A$1:$A$5)>0,0))

What I’m looking for is adding multiple matched values into a single cell from those two columns, so:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Let:

Column A Column B
A F
B B
F H

The result in Column C should be:

Column C
Matched: B, F

If there were no matched values, then we can leave it blank.

>Solution :

Using FILTER:

="Matched: "&TEXTJOIN(", ",,FILTER(A1:A3,ISNUMBER(MATCH(A1:A3,B1:B3,0))))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading