SUMPRODUCT/COUNTIF but only count once

NikToo

Board Regular
Joined
Sep 24, 2015
Messages
66
Office Version
  1. 365
This one is a bit hard to explain, but hoping it makes sense...

I have a table with a list of people in one column, a "source" column, and then daily sales figures with date as the header, and the week number above it. What I want to do is count how many people had sales in a given week.

Week43444444444444444545
NameSource30/10/202131/10/202101/11/202102/11/202103/11/202104/11/202105/11/202106/11/202107/11/202108/11/2021
Adam AntCampaign 1$100000000$100
Betty BoopCampaign 20000$15000000
Charlie ChanCampaign 30$500$5000$500$500

So like this essentially. What I want to be able to say is that 2 people had sales in week 44 (imagine columns either side of this down to week 1), regardless of how much (easy to sumproduct that). I tried a SUMPRODUCT(COUNTIF) but that would say that I have 4 cells which are greater than zero. Is there a way of checking the entire range?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
How about:

Book2
ABCDEFGHIJKL
1Week43444444444444444545
2NameSource30/10/202131/10/20211/11/20212/11/20213/11/20214/11/20215/11/20216/11/20217/11/20218/11/2021
3Adam AntCampaign 1$100000000$100
4Betty BoopCampaign 20000$15000000
5Charlie ChanCampaign 30$500$5000$500$500
6
7
8
9Week# of sales# of sellers
104442
Sheet17
Cell Formulas
RangeFormula
B10B10=SUMPRODUCT((C3:L5>0)*(C1:L1=A10))
C10C10=SUM(--(MMULT((C3:L5>0)*(C1:L1=A10),SEQUENCE(COLUMNS(C1:L1)))>0))
 
Upvote 0
Solution
Thanks, that works! I had to add another dimension and do some dynamic ranges. I'm sure it's summoned a demon or something as well (Access does ask if I want a wizard to analyse my table, so I'm guessing it's a thing).

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,209
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top