Find unique rows with sumproduct

Bandito1

Board Regular
Joined
Oct 18, 2018
Messages
233
Office Version
  1. 2016
Platform
  1. Windows
Hello all,

I got 2 sheets (data(1) and data(2)

Data(1) gathers data from data(2)

It keeps track of how many files are returned.

Now i would like to see unique returns.
Since total returns count the total.

Batch 3 in data(2) has been retoured 2 times but it should count for only 1.
If only one x is in the line it should count 1 and not sum up the x.

Can't manage to get it working since now it shows "1" at unique returns while it should show "2"

Dashboard_test.xlsm
BCDEF
12022
2MonthRetour ARetour BTotal returnsUnique returns
3January
4February
5March
6April
7May
8June
9July
10August
11September
12October2131
13November
14December
15Total21
data(1)
Cell Formulas
RangeFormula
C12C12=SUMPRODUCT(('data(2)'!$B:$B>=B12)*('data(2)'!$B:$B<=EOMONTH(B12,0))*('data(2)'!$C:$C="x"))
D12D12=SUMPRODUCT(('data(2)'!$B:$B>=B12)*('data(2)'!$B:$B<=EOMONTH(B12,0))*('data(2)'!$H:$H="x"))
E12E12=SUM(C12:D12)
F12F12=SUMPRODUCT(('data(2)'!$B:$B>=B12)*('data(2)'!$B:$B<=EOMONTH(B12,0))*('data(2)'!$C:$C="x")*('data(2)'!$H:$H="x"))
B3:B14B3=DATE($B$1,ROWS($1:1),1)
C15:D15C15=SUM(C3:C14)


Dashboard_test.xlsm
ABCDEFH
3BatchRetour AReturn ARetour B
4114-okt-22
524-okt-22x
634-okt-22xx
data(2)
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
How about
Excel Formula:
=SUMPRODUCT(SIGN(('Data(2)'!$B:$B>=B12)*('Data(2)'!$B:$B<=EOMONTH(B12,0))*('Data(2)'!$C:$C="x")+('Data(2)'!$H:$H="x")))
 
Upvote 0
No, not exactly.

Now it says unique returns is 3 while it should be 2
Batch 1 has no returns (since no x under Retour A or Retour B)
Batch 2 has 1 return
Batch 3 has 2 retours but it should count as 1 as we looking for unique.
 
Upvote 0
Now it says unique returns is 3
Not for me it doesn't
Fluff.xlsm
ABCDEF
12022
2MonthRetour ARetour BTotal returnsUnique returns
301/01/2022
401/02/2022
501/03/2022
601/04/2022
701/05/2022
801/06/2022
901/07/2022
1001/08/2022
1101/09/2022
1201/10/202202
1301/11/2022
1401/12/2022
15Total
Details
Cell Formulas
RangeFormula
E12E12=SUM(C12:D12)
F12F12=SUMPRODUCT(SIGN(('Data(2)'!$B:$B>=B12)*('Data(2)'!$B:$B<=EOMONTH(B12,0))*('Data(2)'!$C:$C="x")+('Data(2)'!$H:$H="x")))
B3:B14B3=DATE($B$1,ROWS($1:1),1)
 
Upvote 0
Now it does for me too
Now i try to expand it, thank you very much
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0
Hate this,

It works in my test files, but when i want to use it in my "final" file it doesn't.

Maybe you can see the mistake i make?

=SUMPRODUCT(SIGN(('[Tracker QA on the floor New.xlsm]Tracker QA on the Floor'!$L:$L>=B12)*('[Tracker QA on the floor New.xlsm]Tracker QA on the Floor'!$L:$L<=EOMONTH(B12;0)*('[Tracker QA on the floor New.xlsm]Tracker QA on the Floor'!$S:$S="x")+('[Tracker QA on the floor New.xlsm]Tracker QA on the Floor'!$N:$N="x"))))

It doesn't count; the result is 1 while it should be 2

Tracker QA on the floor New.xlsm
NOPQSTU
12x05-dec-22
15x5-dec-22
Tracker QA on the Floor
 
Upvote 0
Check that the dates in col L are correct & real dates not text.
 
Upvote 0
All my other formules work with column L like totals and count only in column N the "x" or only in column S the "x"
Only when i try to find unique (so 1 or more "x" in a line) it doesn't work right.

Can't be that the mistake is in column L is right?
 
Upvote 0
Without being able to see the actual data & the other formula you use it's impossible to say.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

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