在比较另一列时计算不同的值

时间:2021-05-20 07:54:41

I've been given the task of getting a housing count (from about 20k addresses). We have a spreadsheet with names, addresses and a "zone" number, but have to filter out the duplicates. Here's some sample data:

我的任务是获取住房数量(从大约20k个地址)。我们有一个包含姓名、地址和“区域”号的电子表格,但必须过滤掉重复的数据。这里有一些示例数据:

Zone    Address
1   302 DIGITAL DR 
1   309 DIGITAL DR 
1   309 DIGITAL DR 
1   310 DIGITAL DR 
1   311 DIGITAL DR 
1   314 DIGITAL DR 
1   315 DIGITAL DR 
1   319 DIGITAL DR 
1   320 DIGITAL DR 
2   325 DIGITAL DR 
2   329 DIGITAL DR 
2   333 DIGITAL DR 
2   333 DIGITAL DR 
2   334 DIGITAL DR 
2   334 DIGITAL DR 
2   338 DIGITAL DR 
2   339 DIGITAL DR 
2   339 DIGITAL DR 
2   342 DIGITAL DR 

My task is to count up the number of unique addresses in each zone (you'll see a few duplicates in this sample). Expected results for this would be 8 for Zone 1 and 7 for Zone 2.

我的任务是计算每个区域中唯一地址的数量(您将在这个示例中看到一些重复的地址)。对于第2区,第1区和第7区的预期结果为8。

I'm sure there's a super-fancy Excel formula that can do this for me. Maybe even in a table of its own?

我相信有一个超炫的Excel公式可以帮我做到这一点。甚至是在自己的桌子上?

Zone    Count
1       8
2       7

Anyone clever enough to be able to help out?

有足够聪明的人能帮忙吗?

1 个解决方案

#1


1  

I'm not sure Office 365 has Distinct Count but an alternative is to copy your data (if to be cautious), apply Remove Duplicates and pivot what is left with Zone for ROWS, and Count of Zone for VALUES.

我不确定Office 365是否有不同的计数,但另一种方法是复制您的数据(如果要小心的话),应用删除重复,并将剩下的数据透视为行,将区域计数作为值。

#1


1  

I'm not sure Office 365 has Distinct Count but an alternative is to copy your data (if to be cautious), apply Remove Duplicates and pivot what is left with Zone for ROWS, and Count of Zone for VALUES.

我不确定Office 365是否有不同的计数,但另一种方法是复制您的数据(如果要小心的话),应用删除重复,并将剩下的数据透视为行,将区域计数作为值。