ColumnA - Agent name (Say 1, 2, 3....)
ColumnB - Dealer Name(Say a, b, c, d, e, f, ....)
1 agent have multiple dealers, but a dealer must have one unique agent
ColumnC - Year(2016,NA)
Sample of the table:
Agent Dealer Year
1 AB 2016
1 MN 2016
1 XY NA
2 CD 2016
2 EF NA
2 GH NA
3 RT 2016
3 TN 2016
3 RZ 2016
This formula helps in counting the total active agent name = total agent name minus total agent name with NA
For Agent1, active dealer count = 3-1 = 2
For Agent2, active dealer count = 3-2 = 1
For Agent3, active dealer count = 3-0 = 3
How do I get the active agent details count, agent wise.
Like For Active Agent1 = Total count of agent(1) - total year (na) for agent1
For Active Agent2 = Total count of agent(2) - total year (na) for Agent2
if and count if and counta
=if(A:A="AGENTNAME",(COUNTA('Working Sheet'!$C$4:$C$1048576)-COUNTIF('Working Sheet'!$C$4:$C$1048576,"NA")
COUNTIFS
will do what you want, but I'm not sure I follow your explanation properly – cybernetic.nomad