我需要对 Google 表格中多个区域提交的邮政编码进行连续计数

发布于 2025-01-09 14:49:51 字数 338 浏览 5 评论 0原文

我需要统计每个城市的邮政编码。例如:旧金山 (4) 随着越来越多的邮政编码被提交以添加到该统计中。我尝试过 COUNTIF 和 COUNTIFS,但我正在检查 50 多个标准,因为每个大都市区都有许多不同的邮政编码。我有一份统计所需的所有邮政编码的列表。

输入图片这里的描述

如果 D 列中的任何数字已经在 A 列中或将来附加到 A 列,我需要在 B2 中进行运行计数。 E 列也是如此。

I need to have a tally of zip codes per city. EX: San Francisco (4)
and as more zipcodes are submitted to add to that tally. I have tried COUNTIF and COUNTIFS but I am checking against 50+ criterion as each greater Metropolitan area has many different zip codes. I have a list of all the zip codes needed for the tally.

enter image description here

I need a to have a running count in B2 if any numbers in column D are already in column A or are appended to column A in the future. And the same for Column E.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

回眸一遍 2025-01-16 14:49:51

希望这个公式可以帮到你。目前尚不清楚您是否有与邮政编码相关的城市工作列,但如果有,您可以使用如下内容:

在此处输入图像描述

这个公式的作用是从 B 列中查找城市D 列中的邮政编码列表,它不是计算邮政编码在 A 列中出现的次数并将其设置在括号中。

*请注意,这些城市所使用的邮政编码都不准确。不要密切关注 B 列中的城市名称,因为它们与邮政编码根本不协调。我只是想展示如何实施这座城市。

公式

=IFERROR(ARRAYFORMULA(VLOOKUP($D2:$D,$A$2:$B,2,FALSE)&" ("&COUNTIF(VALUE($A2:$A),VALUE($D$2:$D))&")"),"")

更新:

这是您要找的吗?它统计了相应列中邮政编码显示的总次数,如果它实际上按照图像显示的方式布局,您可以将此公式拖动到任意数量的城市。

=SUM(ARRAYFORMULA(IF(D$2:D<>"",COUNTIF(VALUE($A2:$A),VALUE(D$2:D)),0)))

输入图片此处描述

Hopefully this formula can help you out. It is not clear if you have a working column of cities associated with zip codes but if you do you could use something like this:

enter image description here

What this formula is doing is looking up the city in column B from the zip code list in column D, it is than tallying how many times that zip code appears in column A and setting it in parenthesis.

*Note that none of those cities are accurate to the zip codes used. Do not pay close attention to the city names in column B as they do not coordinate at all with the zipcode. I just wanted to show how to implement the city.

FORMULA

=IFERROR(ARRAYFORMULA(VLOOKUP($D2:$D,$A$2:$B,2,FALSE)&" ("&COUNTIF(VALUE($A2:$A),VALUE($D$2:$D))&")"),"")

UPDATE:

Is this what you're looking for? It tallies up the total number of times a zip code from a corresponding column shows up, you can drag this formula over for as many cities as you want, if it is actually laid out in the way your image shows.

=SUM(ARRAYFORMULA(IF(D$2:D<>"",COUNTIF(VALUE($A2:$A),VALUE(D$2:D)),0)))

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文