Excel COUNTIFS with merged cell

7.2k Views Asked by At

I have excel sheet with 3 subjects: Customer, Data and Product. 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. can you help me please with this. Excel sheet attached.

File link: https://easyupload.io/5h2hou

Image

enter image description here

1

There are 1 best solutions below

3
Harun24hr On BEST ANSWER

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)

enter image description here