根据第1列中的输入,在第2列中的最高数字上查找并加1 [英] Find and add 1 to the highest number in column 2 based on the input in column 1

查看:68
本文介绍了根据第1列中的输入,在第2列中的最高数字上查找并加1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用与下面类似的数据,我想在B7中填写与"Del"相关联的下一个最高编号...结果应为"4".然后继续,在随后的每一行中,B列关联单元格中返回的数字将比A中已与该字符串关联的最高数字高1.

Using data similar to what's below, I want to fill in B7 with the next highest number that would be in associated with "Del"... the result should be "4". And then continue that in each subsequent row, the number that is returned in the associated cell in column B will be 1 higher than the highest number already associated with that string in A.

   A     B
1  Del   1

2  Del   2

3  Pho   1

4  Del   3

5  ACF   1

6  Pho   2

7  Del   ____

推荐答案

在B列中,您可以使用=COUNTIF(A$1:A1,A1)

In Column B, you can use =COUNTIF(A$1:A1,A1)

为解释该公式,我们希望从第一行到当前行计数等于当前行值的所有值.

To explain the formula, we want to count from the first row to the current row any values that equal the current row's value.

这篇关于根据第1列中的输入,在第2列中的最高数字上查找并加1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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