SUMPRODUCT unique Values

Cet88

New Member
Joined
May 17, 2016
Messages
13
Hi,

I have table as follows:
A Customer
B Location
C Turnover Jan
D Turnover Feb
E Turnover March
F Etc Etc for the next 48 months

I want to know how many customers in a specific location have had turnover in a 12 month period.
So if Col B = C3 (C3 on a different tab), and the value in any of the columns C-N is greater than zero then count it.

I started trying to use COUNTIFS with an OR but couldn't get this to work at all, then I moved on to a sumproduct but it is returning the total instances the branch appears as my 2nd criteria isn't correct.

=SUMPRODUCT((Workings!B:B=C3)*IF(SUM(Workings!C:N)>0,1,0))

I know the easy thing would be to add a total column to sum the turnover and do the countif off that, but this is for a rolling 48 months so that would add another 37 columns to the spreadsheet.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
HI,

A small section of the data.



A1X001 - DERBYDERBY - - - - -
A2E001 - GLASWGLASW - - - - 1,241
A4E001 - LEEDSLEEDS - 52 678 87 154
AAA001 - MILTKMILTK - - - - -
AAE362 - DARTFDARTF - - 60 - -
AAE535 - LEEDSLEEDS 310 250 - 249 231



<colgroup><col><col><col span="5"></colgroup><tbody>
</tbody>

As you can see some customer shave turnover in multiple months, but I am only concerned about a 12 month period and therefore need this to report as 1.
thanks
 
Upvote 0
Desired result is this format. count for each month how many customers for each location have traded with us in a 12 month period:
BranchBranch CodeJun-15Jul-15Aug-15Sep-15
Trading Accounts Prioir 12 MonthsPeterboroughPBORO5121
Trading Accounts Prioir 12 MonthsGlasgowGLASW1
Trading Accounts Prioir 12 MonthsDartfordDARTF
Trading Accounts Prioir 12 MonthsLeedsLEEDS

<colgroup><col><col><col><col><col span="3"></colgroup><tbody>
</tbody>
 
Upvote 0
Thanks for the samples. They do not seem to correlate. How does the desired result of 512 obtains for example given the input sample?
 
Upvote 0
Because it is only a snap shot of the data. IN the sample I have given I would want Leeds to only appear twice, darts once etc. As long as there is one instance of a sale in a 12 month period then it should be counted.
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,235
Members
449,092
Latest member
SCleaveland

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