简体   繁体   中英

Count repetitive values in column B based on unique value in column A

I have the following table:

1 John Doe
  John Doe
2 Adam Smith
  Adam Smith
  Adam Smith

I need to count the number of times a name appears for each number value in column A. The numbers are unique.

Place this formula in cell C1 and drag down until the end.

=IF(ISNUMBER(A1),COUNTIF(B:B,B1),"")

在此处输入图片说明

nb - you can more clearly define row numbers instead of using B:B if you like as well

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM