简体   繁体   English

如果在 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?

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 我有两列,A e B,我怎么能有列 C 与 A 的所有元素,即 B 中的内容?

在此处输入图像描述

Example:

A   B
1   0
2   1
3   9
5   1
       

I would to have a column C: 

C
1
1

Thank u!感谢你!

This is a partial answer, since there are empty spaces between.这是部分答案,因为之间有空格。 You can use =IF(ISERROR(MATCH(B2,$A$2:$A$5,0)),"",B2) and drag that formula from C2 to C5您可以使用=IF(ISERROR(MATCH(B2,$A$2:$A$5,0)),"",B2)并将该公式从C2拖到C5

That gives C2 = "", C3 = 1, C4 = "", C5 = 1这给出了 C2 = "", C3 = 1, C4 = "", C5 = 1

https://i.imgur.com/xeFy3MV.png

Formulas:公式:

在此处输入图像描述

You can sort this column afterwards之后您可以对该列进行排序

In cell C2, place the following formula:在单元格 C2 中,放置以下公式:

=FILTER(B2:B5,IFERROR(IF(MATCH(B2:B5,A$2:A$5,0)>0,1),0))

This creates an array of matches then filters the relevent column for the data这将创建一个匹配数组,然后过滤数据的相关列

暂无
暂无

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

相关问题 我有一个 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 我有2列A和B我需要比较B列数据和A而不管所有行 - I have 2 columns A & B i need compare B column data with A irrespective of all rows Excel CONCAT 列 B 和 C 虽然它们在列 A 具有相似的值 - Excel CONCAT Columns B and C While they have Similar Values at Column A 如何在Excel中将内容从A列均匀分配到B,C和D列 - How do I distribute Contents from Column A to Column B, C, and D evenly in Excel R:当我在分隔列中有值 a、b、c 时,有没有办法获得 aa(bc) 表示法? - R: Is there a way to get a a(b-c) notation when I have the values a,b,c in separated columns? Excel:如何平均 B 列中与 A 列中具有相同数字的所有数字? - Excel: How to average all numbers in column B that have the same number in Column A? 我如何比较两列以查看B单元格中的值是否出现在A列的任何位置? - How can i compare two columns to see if the value in the B cell appears anywhere in column A? Excel:我想用B列的内容填充A列,只有当B列值以F开头时 - Excel: I want to populate Column A with the Contents of Column B, only if Column B value starts with F 如何选择工作表1中A和B列的值与工作表2中A和B列的值完全相等的所有实例? - How can I select all the instances in which the values of Columns A & B in Sheet 1 are exactly equal to Columns A & B of Sheet 2?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM