Count Unique Value with Multiple Criteria

RattlingCarp3048

Board Regular
Joined
Jan 12, 2022
Messages
202
Office Version
  1. 365
Platform
  1. Windows
I am trying to count unique values sheet "Daily Data Entry" column A if the following criteria are met:

Daily Data Entry Audit'!F:F = 'Monthly Data Audit'!B5
'Daily Data Entry Audit'!E:E = 'Monthly Data Audit'!A5
'Daily Data Entry Audit'!I:I = LookUp!$A$2

this is the formula i have so far. it is returning 0 when it should be returning 2
=IF(AND('Daily Data Entry Audit'!F:F='Monthly Data Audit'!B5,'Daily Data Entry Audit'!E:E='Monthly Data Audit'!A5,'Daily Data Entry Audit'!I:I=LookUp!$A$2),COUNTA(UNIQUE('Daily Data Entry Audit'!A:A)),"0")

I have already checked cell formatting for extra spaces and typos. What am i doing wrong?

1658423076657.png

1658423088984.png
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
How about
Excel Formula:
=ROWS(UNIQUE(FILTER('Daily Data Entry Audit'!A:A,('Daily Data Entry Audit'!F:F='Monthly Data Audit'!B5)*('Daily Data Entry Audit'!E:E='Monthly Data Audit'!A5)*('Daily Data Entry Audit'!I:I=LookUp!$A$2))))
 
Upvote 0
How about
Excel Formula:
=ROWS(UNIQUE(FILTER('Daily Data Entry Audit'!A:A,('Daily Data Entry Audit'!F:F='Monthly Data Audit'!B5)*('Daily Data Entry Audit'!E:E='Monthly Data Audit'!A5)*('Daily Data Entry Audit'!I:I=LookUp!$A$2))))
this worked. Thanks Fluff
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
You're welcome & thanks for the feedback.
question: i finished adding in all the live data (over 1000 rows) and the formula worked great. I needed to narrow the calculation so i added an additional criteria (which works) but its returning #CALC when the value should be 0 as there is nothing to calculate. Is there a work around to make it show 0?

=ROWS(FILTER('Daily Data Entry Audit'!A:A,('Daily Data Entry Audit'!F:F='Monthly Data Audit'!B5)*('Daily Data Entry Audit'!E:E='Monthly Data Audit'!A5)*('Daily Data Entry Audit'!I:I=LookUp!$A$2)*('Daily Data Entry Audit'!J:J<>"")))
 
Upvote 0
You just need to wrap the formula in the IFERROR function.
 
Upvote 0
You just need to wrap the formula in the IFERROR function.
thanks. That was one of the first things i tried yesterday with no luck, among several other options. guess i typed it wrong cut its working for me today. (y)
 
Upvote 0
Glad it's sorted & thanks for the feedback.
 
Upvote 0
Glad it's sorted & thanks for the feedback.
Fluff, sorry to keep coming back :( if i need to create a new thread i will but i think my issue links back to this formula...

there are approx. 1300 rows currently in this file and it will eventually grow to 10,000-20,000 rows before retiring it. While the formula you provided is currently working beautifully, i have noticed a significant decrease in calculation/processing speeds (around 2 minutes just to save and 30-60 seconds between simple clicks between cells). When i turn off the auto-calculations the file runs extremely smooth, however, its not ideal to do this for the entire workbook long term. These problems didn't exist prior to the formula being added and its only this file so i know its not the computer and i have already ruled out internet connection speeds. Could it be that the formula is too volatile and slowing it down? Maybe there is another combination of functions less harsh that we could use? is there a way to turn off the auto-calculations to the sheet specifically and not the entire workbook?

i'm not sure where to take it from here.
 
Upvote 0
Just change the ranges to something suitable rather than using whole columns.
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,823
Members
452,946
Latest member
JoseDavid

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