如何通过给定的值SUM一个范围内的重复数量? [英] How to SUM the number of duplicates in a range by given value?

查看:117
本文介绍了如何通过给定的值SUM一个范围内的重复数量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个简单的例子如下:

 列A是包含所有数据的列表
列B是列表列A中没有重复项的所有唯一数据
列C将是列A中B列中每个项目的重复次数

如何在列C中为单元格编写一个简单的公式,以将列A中的每个项目从列A中分配?



我使用 = sum(查找($ a $ 1:$ a $ 10 = $ B $ 1))为C1但收到:太少参数此功能 p>

解决方案

一个简单的countif()应该足够了,除非我误解了..

  = COUNTIF($ A $ 1:$ A $ 10,B1)

返回在第一个参数(这是一个范围)中找到第二个参数的次数。




A simple example as below:

Column A is the list containing all data
Column B is the list of all unique data in Column A without duplicates
Column C will be the number of duplicates for each item in Column B from Column A

How to write a easy formula for cells in Column C to sum each item in Column B from Column A?

I used =sum(lookup($a$1:$a$10=$B$1)) for C1 but received: too few arguments for this function.

解决方案

A simple countif() should suffice unless I'm misunderstanding..

=COUNTIF($A$1:$A$10,B1)

Count if returns the number of times the second argument is found in the first argument (which is a range.)

这篇关于如何通过给定的值SUM一个范围内的重复数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆