Counting Using Defined Names

tycasey17

Board Regular
Joined
Sep 26, 2013
Messages
93
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
I am wanting to count the number of personnel within a defined name. I have tried using =COUNTIF(A1:A5,_OFF) "_OFF" is the defined name having various titles in them. The overall outcome of the formula I am needing help with is to show there are 4 doctors of the entire range using the _OFF defined name. For example:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name (Name is irrelevant)[/TD]
[TD]Title[/TD]
[/TR]
[TR]
[TD]Doe, John[/TD]
[TD]Mr.[/TD]
[/TR]
[TR]
[TD]Doe, John[/TD]
[TD]PhD[/TD]
[/TR]
[TR]
[TD]Doe, John[/TD]
[TD]MD[/TD]
[/TR]
[TR]
[TD]Doe, John[/TD]
[TD]DO[/TD]
[/TR]
[TR]
[TD]Doe, John[/TD]
[TD]PhD[/TD]
[/TR]
</tbody>[/TABLE]

Defined Name: "_OFF"
[TABLE="width: 500"]
<tbody>[TR]
[TD]PhD
[/TD]
[/TR]
[TR]
[TD]MD[/TD]
[/TR]
[TR]
[TD]DO[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Excel Workbook
ABCDE
1NameTitleTitleCount
2johnmrphd2
3johnphdmd2
4johnMddo1
5johndo
6johnMd
7johnphd
sheet1
 
Last edited:
Upvote 0
Maybe


Excel 2013/2016
ABCDE
1Name (Name is irrelevant)TitlePhD
2Doe, JohnMr.MD
3Doe, JohnPhDDO
4Doe, JohnMD4
5Doe, JohnDO
6Doe, JohnPhD
Jan 2018
Cell Formulas
RangeFormula
E4{=SUM(COUNTIF(B2:B6,_Off))}
Press CTRL+SHIFT+ENTER to enter array formulas.
Named Ranges
NameRefers ToCells
_Off='Jan 2018'!$D$1:$D$3
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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