问题描述
好的,所以我有一个excel文件,其中有一个列可能包含重复的值,像这样
PO NUMBER PO COUNT
P100293490 4
P100293490
P100293490
P100293490
P100293492 2
P100293492
P100293494 3
P100293494
P100293494
P100293497 4
P100293497
P100293497
P100293497
P100293499 1
P100293490 2
P100293490
P100293492 1
我需要计算它出现在列上的次数,并将其放在第一次出现的单词旁边。问题是 PO NUMBER 未排序,因此值可能会在excel的较低行重复。我试过一切(Lookup,Match,Countif,IF)
,没有什么似乎工作。请帮忙?感谢提前
假设您提供的数据在 A1:B18
(在第1行中包含标题),请在 B2
中输入:
= IF(A1≠A2,MATCH(TRUE,INDEX(A2:A $ 1000 A2),) - 1,)
pre>
根据需要复制。
如有必要,将1000修改为足够高的行引用。 p>
Ok, So I have an excel file that have a column that may contain duplicate value like this
PO NUMBER PO COUNT
P100293490 4
P100293490
P100293490
P100293490
P100293492 2
P100293492
P100293494 3
P100293494
P100293494
P100293497 4
P100293497
P100293497
P100293497
P100293499 1
P100293490 2
P100293490
P100293492 1I need to count how many times it appeared on the column and place it beside the first occurrence of the word. The problem is that the PO NUMBER is not sorted so values may repeat on the lower rows of the excel. i tried everything (Lookup, Match, Countif, IF) and nothing seems to work. Please Help? Thanks in Advance
解决方案Assuming the data as you give it is in
A1:B18
(with headers in row 1), enter this inB2
:=IF(A1<>A2,MATCH(TRUE,INDEX(A2:A$1000<>A2,),)-1,"")
Copy down as required.
Amend the 1000 to a sufficiently higher row reference if necessary.
这篇关于计数值出现在列中的次数(excel)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!