简体   繁体   English

Excel公式在第一列中计算数字并在同一行的相应列中输出?

[英]Excel formula to count a number in first column and output in corresponding column in same row?

Hello guys I was trying to achieve the following in Excel 大家好,我试图在Excel中实现以下目标

A   B   C   D   E
1   1   0   0   0
0   0   0   0   0
2   0   1   0   0
1   2   0   0   0
2   0   2   0   0

So if I enter a number in A column the corresponding column to that number counts how many times the number occurred in A and outputs the same in the same row at the corresponding column. 因此,如果我在A栏中输入数字,则与该数字对应的列会计算该数字在A中出现的次数,并在同一列的同一行中输出相同的数字。 I ve tried B = COUNTIF(A1:A1000, 1) but this is useless if you know what I mean. 我已经尝试过B = COUNTIF(A1:A1000, 1)但是如果您知道我的意思,这是没有用的。 Any ideas on how to achieve the result? 关于如何获得结果的任何想法?

Try this formula in B1 copied down and across 尝试在B1中向下复制的公式

=IF($A1=COLUMNS($B1:B1),COUNTIF($A$1:$A1,COLUMNS($B1:B1)),0)

That will give the results you showed 那会给你显示的结果

暂无
暂无

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

相关问题 Excel公式:列中唯一单元格的数量,IF对应的行是一定值 - Excel formula: count of unique cells in column, IF corresponding row is certain value 仅当同一行的 B 列是同类中的第一个且 A 列小于指定值时,才计算 A 列的公式或方法(在 excel 中)? - Formula or way (in excel) to count column A only if column B of the same row is the first of it's kind and column A is less then a specified value? Excel VBA脚本来计算A列中小于同一行的B列中的值的数量 - Excel VBA script to count the number of values in column A that are less than the values in Column B same row 将一列所有单元格的值移动到对应的excel行号 - Move the value of all cells in a column to their corresponding excel row number 在Excel公式中将列号与行字母分开 - Separating Column number from Row letter in an Excel formula Excel公式将一行累加到特定列号 - Excel formula to Sum a row up to specific column number Excel 公式在列中搜索关键字并返回其行号 - Excel Formula to Search keyword in a column and return its row number Excel:如何查找列的第一行的值,具体取决于在同一列的另一行中查找给定数字的位置 - Excel: How to find the first row's value of a column depending on where to find a given number in another row of the same column EXCEL公式:将SUMIFS结果乘以来自不同列的相应行值 - EXCEL Formula: Multiply SUMIFS outcome with the corresponding row value from a different column Excel 公式检查行中最后一个非零值并从相应列中获取单元格值 - Excel formula to check the last non zero value in row and bring cell value from corresponding column
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM