COUNTIFS with Named Range in the Criteria

Bokuchan

New Member
Joined
Mar 17, 2018
Messages
2
My first directive was to count all the number of occurrences of jobs.
I started with a named range "Job" (A1:A10) containing numeric values associated to projects.
=COUNTIF(Job,">0") gave me the correct result based on the number of entries.

My second directive was to count all jobs as long as they were not "Added" or "Adjusted"
Made named range "DontCount" with the entries "Added" or "Adjusted".
Made named range "Description" (B1:B10) containing Data Validations using the range DontCount for the list.
modified the formula to =COUNTIFS(Job,">0",Description,"<>Added",Description,"<>Adjusted") which gives me the correct results.

Now i need to added a third Description to not be added. I have 24 sets of the Job and Description ranges and forumlas, names are adjusted for each set of course. So to save my self some time I would like to be able to adjust the formula to something like =COUNTIFS(Job,">0",Description,"<>DontCount") which doesn't work. But the idea is that I only have to adjust the named range "DontCount" and add the additional item. I would not have to adjust all 24 COUNTIFS

Thanx in advance.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Welcome to the forum.

Please provide some sample data together with expected results so that we can conduct experiments.
 
Upvote 0
Job Description

2
6 Adjusted
4
6
8 Added


DontCount

Added
Adjusted

=COUNTIFS(Job,">0",Description,"<>Added",Description,"<>Adjusted")
Result 3. Expected

=COUNTIFS(Job,">0",Description,"<>DontCount")
Result 5. UnExpected
 
Upvote 0
If I understand correctly, this should provide the correct result.


Book1
ABCD
1JobDescriptionDon'tCount
22Added
36AdjustedAdjusted
44
56
68Added
7
8
9Jobs >0 also not on Don'tCount list3
Sheet42
Cell Formulas
RangeFormula
C9{=COUNTIFS(Job,">0")-SUM(--(Description=TRANSPOSE(DontCount)))}
Press CTRL+SHIFT+ENTER to enter array formulas.
Named Ranges
NameRefers ToCells
Description=Sheet42!$B$2:$B$6
DontCount=Sheet42!$D$2:$D$3
Job=Sheet42!$A$2:$A$6
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,777
Members
448,991
Latest member
Hanakoro

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