Please help Adding a count of unique values to a current calc

debralee

New Member
Joined
Dec 30, 2016
Messages
11
Good morning,

The below calc works as it should. I now need to add to this calc using the below as a criteria and counting total unique values from column $B:$B if they meet the below criteria.

=COUNTIFS(SURVEYS!$N:$N,"=Jacksonville",SURVEYS!$A:$A,"=ANSWERED")

Please help
 
Last edited:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Try:

=SUM(SIGN(FREQUENCY(IF(Surveys!A1:A50="Answered",IF(Surveys!N1:N50="Jacksonville",MATCH(Surveys!B1:B50,Surveys!B1:B50,0))),ROW(A1:A50)-ROW(A1)+1)))

confirmed with Control+Shift+Enter.
 
Upvote 0
Greatly appreciate the help but it does not seem to work. Also, If I change Jacksonville to something else, I get a value error.

Any thoughts on that?
 
Upvote 0
When you say "does not seem to work", what do you mean? Wrong answer, error message? If you get the #VALUE ! error, it could be that you are not entering the formula as an array. Select the cell where you want it, past the formula in the formula bar, change the references to match your sheet, then hold down the Control and Shift keys, then press Enter.

Here's what I get:
ABCNOPQR
1aJacksonvilleUnique countCounif
2bJacksonville34
3cJacksonville
4dOther
5ANSWEREDeOther
6fOther
7aJacksonville
8ANSWEREDbJacksonvillex
9ANSWEREDcJacksonvillex
10ANSWEREDdJacksonvillex
11eJacksonville
12fOther
13aJacksonville
14ANSWEREDbJacksonvillex - duplicate
15cJacksonville
16dJacksonville
17eOther
18fOther
19aJacksonville
20bJacksonville
21cJacksonville
22ANSWEREDdOther
23eOther
24fJacksonville
25aJacksonville
26ANSWEREDbOther
27cJacksonville
28dJacksonville
29eJacksonville
30fOther

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Surveys

Worksheet Formulas
CellFormula
R2=COUNTIFS(Surveys!$N:$N,"=Jacksonville",Surveys!$A:$A,"=ANSWERED")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
P2{=SUM(SIGN(FREQUENCY(IF(Surveys!A1:A50="Answered",IF(Surveys!N1:N50="Jacksonville",MATCH(Surveys!B1:B50,Surveys!B1:B50,0))),ROW(A1:A50)-ROW(A1)+1)))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



If you make changes to the formula, like changing the city, you need to re-enter the Control+Shift+Enter. Given that, it may be easier to put the city in a work cell of its own, like Q1:

=SUM(SIGN(FREQUENCY(IF(Surveys!A1:A50="Answered",IF(Surveys!N1:N50=Q1,MATCH(Surveys!B1:B50,Surveys!B1:B50,0))),ROW(A1:A50)-ROW(A1)+1)))

with CSE.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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