简体   繁体   English

Excel COUNTIFS 与合并单元格

[英]Excel COUNTIFS with merged cell

I have excel sheet with 3 subjects: Customer, Data and Product.我有 excel 表,其中包含 3 个主题:客户、数据和产品。 I want to calculate how many product for each customer, and I used "COUNTIFS" formula, the problem is customer row is merged, so when I use "COUNTIFS" formula it's doesn't work.我想计算每个客户有多少产品,我使用了“COUNTIFS”公式,问题是合并了客户行,所以当我使用“COUNTIFS”公式时它不起作用。 can you help me please with this.你能帮我解决这个问题吗? Excel sheet attached.附上 Excel 表。

File link: https://easyupload.io/5h2hou文件链接: https://easyupload.io/5h2hou

Image图片

在此处输入图像描述

Although it is strong recommended to avoid merged cells where you need calculation using formulas.尽管强烈建议您避免需要使用公式计算的合并单元格。 It cause too many problems.它会导致太多的问题。 Still you can apply some tricks to achieve your goals.你仍然可以应用一些技巧来实现你的目标。 For your case you can try below formula-对于您的情况,您可以尝试以下公式-

=COUNTIFS(INDIRECT("C"&MATCH($F2,$A:$A,0)&":C"&MATCH($F2,$A:$A,0)+5),G$1)

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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