SUMPRODUCT with condition

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
209
Office Version
  1. 365
Platform
  1. Windows
Hi, appreciate if you can help...
I have a range with dates, which also contains some duplicates and blank cells. To find the # of unique entries in this range I'm using the following formula (example):
=SUMPRODUCT((J2:J10<>"")/COUNTIF(J2:J10,J2:J10&""))
This works. However.
How do I find the # of unique entries (or, to be more specific, unique dates) in column J if the output should also be matching one more criteria? Let's say, all unique entries in column J must also have a matching entry "001" in column K, while column K would be filled with random entries 001, 002, 003, 004 etc.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
In cells L2:L10, cell L2, =IF(L2=matchvalue,J2,""). Then change your original equation from Js to Ls.
 
Upvote 0
Apologies I may not be getting this. Where does the condition from column K come into play?
Also, cell L3 would have =IF(L3=matchvalue,J3,"") etc?
 
Upvote 0
How about:

Book1
JKLM
1Uniques
21/1/202013
31/1/20201
42/1/20201
51/2/20202
61/1/20203
71/2/20204
8
9
103/1/20201
Sheet6
Cell Formulas
RangeFormula
M2M2=SUM(SIGN(FREQUENCY(IF(K2:K10=1,J2:J10),J2:J10)))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
Apologies I may not be getting this. Where does the condition from column K come into play?
Also, cell L3 would have =IF(L3=matchvalue,J3,"") etc?
Sorry about that, L2 should've been K2 (L3 to K3 in your mentioned formula.
=IF(K2=matchvalue,J2,"")
This returns all your rows that meet the single criteria you mentioned. Then pulls out the uniques from column L.
 
Upvote 0

Forum statistics

Threads
1,214,556
Messages
6,120,190
Members
448,949
Latest member
keycalinc

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