简体   繁体   English

我有2列A和B我需要比较B列数据和A而不管所有行

[英]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 我有2列A和B我需要将B列数据与A进行比较,无论是否匹配所有行,然后输出应如下所示

  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. 在上面的示例中,字符串Deepeepak与A行匹配,因此它显示在C列中。第二行未找到匹配的内容,因此空白的第三行字符串“ heloo”匹配了,因此显示了第四行空白的第五行字符串“ Deepak deepak”应该显示,因为在该列中是重复的。

Can anyone help on this. 任何人都可以帮忙。 I tried Index and it didnt work. 我试过索引,但没有用。

Use the following formulas: 使用以下公式:

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

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

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

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

在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如果在 excel 我有两列,A e B,我怎么能有列 C 与 A 的所有元素,即 B 中的内容? - If on excel I have two columns, A e B, how can I have the column C with all the elements of A, that are contents in B? 我有一个 Excel 表,它有 3 列 AB C 列,我希望 D 列是 RGB(A,B,C) 的颜色 - I have an Excel sheet that has 3 columns A B C columns and I want the D column to be the color of RGB(A,B,C) 我在Excel A和B中有两列。 我想将两列合并为a1,b1,a2,b2等形式的一列 - i have two columns in excel a and b. i want to merge both the columns into one column in the form of a1,b1,a2,b2 and so on 我想比较3个不同的列(B,C,D)的值,然后想在F列中获得较高的值结果 - I want to compare 3 different columns (B,C,D) values then want to get the higher value result in F column 我如何比较两列以查看B单元格中的值是否出现在A列的任何位置? - How can i compare two columns to see if the value in the B cell appears anywhere in column A? 使用VBA删除“ B”列为空的所有行 - Deleting All Rows That Have an Empty “B” Column Using VBA 我有2列的值。 试图查找列A中哪些不在列B中的值 - I have 2 columns with values. Trying to find which values in Column A that are not in Column B 是否有一个函数可以将 A 的所有列合并到 B 的所有列 - Is there a function where I can merge all columns of A to all columns of B 如何在 excel VBA 中编写毕达哥拉斯公式,就像我需要 select 列 A 和列 B 的所有值 - How to write Pythagoras formula in excel VBA, like I need to select all the values of column A and column B 比较B和C列,然后移动数据 - Compare Columns B and C then shift data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM