Countifs + unique values

ItalianPlatinum

Well-known Member
Joined
Mar 23, 2017
Messages
793
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello - is someone able to assist me in modifying/providing a formula or VBA to accomplish the below. very simply trying to count column A7 down for unique values (no duplicates) based off Column B7 down being today's date. My current formula only accomplishes the first part.

test2.xlsm
ABC
110/3/2020
2
3Total13
4DESIRED10
5
6TypeSubmission Date
7AAA10/3/2020
8BBB10/3/2020
9III10/3/2020
10JJJ10/3/2020
11KKK10/3/2020
12LLL10/3/2020
13MMM10/3/2020
14NNN10/3/2020
15OOO10/3/2020
16PPP10/3/2020
17ZZZ9/29/2020Not current Day
18XXX9/29/2020Not current Day
19YYY9/29/2020Not current Day
20OOO9/30/2020Duplicate
21OOO9/30/2020Duplicate
22OOO9/30/2020Duplicate
23PPP9/30/2020Duplicate
Ns
Cell Formulas
RangeFormula
B1,B7:B16B1=TODAY()
B3B3=SUMPRODUCT((Ns!$A$7:$A$2995<>"")/COUNTIFS(Ns!$A$7:$A$2995,Ns!$A$7:$A$2995&""))
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
This works, there may be other ways as well
Book1
ABC
104/10/2020
2
3Total10
4DESIRED10
5
6TypeSubmission Date
7AAA04/10/2020
8BBB04/10/2020
9III04/10/2020
10JJJ04/10/2020
11KKK04/10/2020
12LLL04/10/2020
13MMM04/10/2020
14NNN04/10/2020
15OOO04/10/2020
16PPP04/10/2020
17ZZZ29/09/2020Not current Day
18XXX29/09/2020Not current Day
19YYY29/09/2020Not current Day
20OOO30/09/2020Duplicate
21OOO30/09/2020Duplicate
22OOO30/09/2020Duplicate
23PPP30/09/2020Duplicate
Ns
Cell Formulas
RangeFormula
B1,B7:B16B1=TODAY()
B3B3=SUMPRODUCT(IFERROR((Ns!$B$7:$B$2995=B1)/COUNTIFS($B$7:$B$2995,$B$1,Ns!$A$7:$A$2995,Ns!$A$7:$A$2995&""),0))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
This works, there may be other ways as well
Book1
ABC
104/10/2020
2
3Total10
4DESIRED10
5
6TypeSubmission Date
7AAA04/10/2020
8BBB04/10/2020
9III04/10/2020
10JJJ04/10/2020
11KKK04/10/2020
12LLL04/10/2020
13MMM04/10/2020
14NNN04/10/2020
15OOO04/10/2020
16PPP04/10/2020
17ZZZ29/09/2020Not current Day
18XXX29/09/2020Not current Day
19YYY29/09/2020Not current Day
20OOO30/09/2020Duplicate
21OOO30/09/2020Duplicate
22OOO30/09/2020Duplicate
23PPP30/09/2020Duplicate
Ns
Cell Formulas
RangeFormula
B1,B7:B16B1=TODAY()
B3B3=SUMPRODUCT(IFERROR((Ns!$B$7:$B$2995=B1)/COUNTIFS($B$7:$B$2995,$B$1,Ns!$A$7:$A$2995,Ns!$A$7:$A$2995&""),0))
Press CTRL+SHIFT+ENTER to enter array formulas.
Nice! Thank you. So far this is working as I would like. :)
 
Upvote 0

Forum statistics

Threads
1,214,984
Messages
6,122,601
Members
449,089
Latest member
Motoracer88

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