COUNTIF AND Issues - Counting across columns

DSL1970

New Member
Joined
Jun 28, 2012
Messages
16
All,

I am having issues with a table that will have other data added daily. I have three columns where I have Chain of Command 1, Chain of Command 2 and FT/PT.

Based on a pre-selected leader, I can get the count of how many times that leader chows up in the list using COUNTIF; however, I am having a problem in getting the number of Full-Time (FT) employee count based on this pre-selected leader. The number can only be equal to or less than the count number.Any assistance to get the number of FT workers by leader would be appreciated.

[TABLE="width: 812"]
<tbody>[TR]
[TD]Which Leader?[/TD]
[TD]Count[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 1[/TD]
[TD]=COUNTIF(A5:B24,A2)[/TD]
[TD="colspan: 4"]=COUNTIF(AND((A5:B24,A2), C5:C24="FT"),COUNTIF( C5:C24="FT"),"")[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]CHAIN OF COMMAND 1[/TD]
[TD]CHAIN OF COMMAND 2[/TD]
[TD]PT/FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 1[/TD]
[TD]LEADER 19[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 1[/TD]
[TD]LEADER 20[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 1[/TD]
[TD]LEADER 21[/TD]
[TD]PT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 2[/TD]
[TD]LEADER 22[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 3[/TD]
[TD]LEADER 23[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 4[/TD]
[TD]LEADER 24[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 5[/TD]
[TD]LEADER 25[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 6[/TD]
[TD]LEADER 26[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 7[/TD]
[TD]LEADER 27[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 8[/TD]
[TD]LEADER 28[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 9[/TD]
[TD]LEADER 29[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 10[/TD]
[TD]LEADER 30[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 11[/TD]
[TD]LEADER 31[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 12[/TD]
[TD]LEADER 32[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 13[/TD]
[TD]LEADER 33[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 14[/TD]
[TD]LEADER 34[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 15[/TD]
[TD]LEADER 35[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 16[/TD]
[TD]LEADER 36[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 17[/TD]
[TD]LEADER 37[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]LEADER 18[/TD]
[TD]LEADER 38[/TD]
[TD]FT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hello DSL1970,

I think this will solve your problem :

Uses COUNTIFS instead of COUNTIF

=COUNTIFS(A5:A24,A2;C5:C24,"FT")+COUNTIFS(B5:B24,A2;C5:C24,"FT")

Have a nice day!
Den
 
Upvote 0
Sorry jtakw, but the solution you pointed out from Momentman is not working, because if you have your leader in column "CHAIN OF COMMAND 2" it will not count it
For example : "LEADER 1" in cell "B12" will still write 2 instead of 3
 
Upvote 0
Sorry jtakw, but the solution you pointed out from Momentman is not working, because if you have your leader in column "CHAIN OF COMMAND 2" it will not count it
For example : "LEADER 1" in cell "B12" will still write 2 instead of 3

I'm not pointing out a Solution, I'm pointing out a Double Post, so people could refer to it and vice versa, so nobody wastes their time incase it's solved.
In this case, maybe people reading the Other post don't know about your suggested solution here, and they're spending time coming up with something there.

We should always point out Double Posts for this reason.

Edit: and MODs usually lock and/or delete double/re-posts.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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