• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Compare 2 columns and write the matching in 3rd column

aksusa

New Member
I need to compare 2 columns and list the matching in 3rd column


ColumnA ColumnB

servera server1

serverb server2

serverc servera

server1 serverb


I need to matching in ColumnC


ColumnC [Expected output ]

servera

serverb

server1


Can you pls help with this..


Thanks
 
Here are two solutions:


=if(isna(vlookup(a1,b:c,1,false)),"",a1)


or


If you want to know how many times it repeats you can do:

=countif(b:b,a1)


But, neither takes into account if the item in column A repeats itself.


For creating a list like your expected output, I don't know.
 
If you don't mind gaps, this will display all the entries from Col A that are in Col B:

=IF(COUNTIF(B:B,A1),A1,"")
 
Back
Top