简体   繁体   中英

I have 2 columns A & B i need compare B column data with A irrespective of all rows

I have 2 columns A & B i need compare B column data with A irrespective of all rows if it is matched then output should be like below

  A .     B .     C 
Deepak  Deepak  Deepak 
Kiran   Venky   
Arun    heloo   Heloo
Varun   Lekha   
Manju   Deepak  Deepak Deepak
heloo   sambha  
Deepak  subbu   
        love    
        sudip   
        jyothi  
        kiran   

In the above example String Deepak matched with A row hence it is displayed in C column 2 nd row no matched found so blank 3rd row string "heloo" matched hence displayed 4th row blank 5th row string "Deepak deepak" should display because in column there is duplication.

Can anyone help on this. I tried Index and it didnt work.

Use the following formulas:

  • Column D:
    =COUNTIF(A:A,B:B) or =COUNTIF(A:A,B2)

  • Column E:
    =COUNTIF(B:B,B:B) or =COUNTIF(B:B,B2)

  • Column F:
    =COUNTIF(B$B1:B2,B:B) or =COUNTIF(B$B1:B2,B2)

  • Column G:
    =IF(D:D>0,TRIM(REPT(B:B & " ",F:F)),"") or =IF(D2>0,TRIM(REPT(B2 & " ",F2)),"")

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM