计算Excel中的重复值 [英] Count duplicate values in Excel

查看:49
本文介绍了计算Excel中的重复值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一列这样填充0和1:

  A1个1个1个001个01个1个001个001个 

我想做的就是简单地增加一列,直到下一个限制为止,这个值都会被计数,就像这样:

  A B1 11 21 30 10 21 10 11 11 20 10 21 10 10 21 1 

我一直在寻找答案,但我只发现了无效的旧帖子和公式.这应该是一件简单的事情.我只想要一个公式,而我只想使用一列!我在Excel公式中是个菜鸟.

我尝试过但没有用的东西:

  1. I have a column filled with 0s and 1s like this:

    A
    
    1
    1
    1
    0
    0
    1
    0
    1
    1
    0
    0
    1
    0
    0
    1
    

    What I want to do is simply have another column, with this values being counted until the next limit, like this:

    A    B
    
    1    1
    1    2
    1    3
    0    1
    0    2
    1    1
    0    1
    1    1
    1    2
    0    1
    0    2
    1    1
    0    1
    0    2
    1    1
    

    I have searched for an answer, but I only found old posts and formulas that didn't work. This should be a simple thing. I only want one formula and I prefer to use only one column! I'm a noobie in Excel formulas.

    Things I've tried but didn't work:

    1. Count duplicate values in a sequence
    2. Counting duplicates in Excel
    3. How do I count consecutive same values
    4. And other sources.

    解决方案

    steps as below

    1. write cell B1 with 1
    2. write cell B2 with =IF(A2=A1,B1+1,1)
    3. drag cell B2 down

    这篇关于计算Excel中的重复值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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