Count.ifs

Copper Contributor

Good morning,

I have in one column a list of customers and in another column the products that each customer is buying.

I want to count, for each pair of products, the number of customers that buys them. 

If tried to do it using +count.ifs, but it does not work.

What am i missing?

I attach the worksheet I´m using.

 

Thankyou very much

10 Replies

Hi @Jarama11,

 

Just to make sure I understand your request:

You want see the number of customers who bought product 15 (F2) plus the number of customers who bought product 28 (G2), if so, the following formula will help

=COUNTIFS($B$2:$B$446,"="&F2)+COUNTIFS($B$2:$B$446,"="&G2)

@Jarama11 

That could be

=COUNTA(UNIQUE(FILTER(A2:A446,COUNTIF($B$2:$B$446,$F2)*COUNTIF($B$2:$B$446,$G2))))

@Jarama11 

Nos of ProductProductTotal Product SaleCustomerTotal buy
1Product 132Customer 5013
2Product 107Customer 3516

 

find attached sheet

Total Sale = =COUNTIF(B:B,H2)

Total buy by customer = COUNTIF(A:A,J2)

 

Total Sale =445

 

 

Thank you Sergei, let me check it, and I will be back to you..


Juan
Many thanks, but the point is that I need to count how many customers buy product 1 and Product 2, product 1 and product 3,...

@Jihad Al-Jarady 

Hi,

 

No, I do not need to count the number of customers that buy product 15 plus the number of customers that buy product 28, but the number of customers that buy product 15 AND product 28 (the pair).

Thanks

 

 

Juan

Hi @Jarama11 

 

Ah,
you want the number of customer that bought both products at the same time!

@Jihad Al-Jarady 

My assumption - number of unique customers. One customer could purchase same pair of products several times, so we need number of customers, not number of purchases.

That's right Sergei, unique customers that buy different products, regardless the number of purchases.

Juan

@Jarama11 

 

Done

check attached sheet

 

=COUNTIFS(Hoja1!$A$2:$A$446,$A2,Hoja1!$B$2:$B$446,B$1)