相同列值的编号/排序集 [英] Numbering/sequencing sets of same column values
本文介绍了相同列值的编号/排序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何对一组相同的列值进行编号/排序?例如:
How to do numbering/sequencing for sets of same column values? For example:
Col1 Col2
Andy 1
Chad 1
Bill 1
Andy 2
Bill 2
Bill 3
Chad 2
Bill 4
由于 Andy
有 2 个值,我想在第 2 列中将其编号为 1 和 2.对于 Bill
,我想将其编号为 1、2、3 和 4等等.
Since Andy
got 2 values, I want to number it 1 and 2 in Column 2. For Bill
, I want to number it 1, 2, 3 and 4 and so on.
推荐答案
你可以用 countif
和一个滑动范围来完成这个:
You can accomplish this with countif
and a sliding range :
A B
1 val1 =COUNTIF($A$1:A1, A1)
2 valx =COUNTIF($A$1:A2, A2)
等等.
B列中的公式可以在列中向下拖动/自动填充.它锚定在范围的开头,并且只向下看我们正在编号的值;COUNTIF 以这种方式计算上一组中的匹配值.
The formula in column B can be dragged down / autofilled in the column. It anchors to the start of the range and only looks as far down as the value we are numbering; COUNTIF is tallying up the matching values in the preceding set this way.
这篇关于相同列值的编号/排序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文