Counting with formulas to meet specific conditions

Greemo

New Member
Joined
May 22, 2014
Messages
42
Hello,

I'm using the COUNTIFS formula but am having trouble getting the count to flow. Here is what I have currently:

=COUNTIFS(B:B,"ground",C:C,"6/28/2014",D:D,GROUNDSTAFF)

Where:
- Column B contains different levels. I only need to count those that are on the "ground" level
- Column C has different expiration dates. I only need to count those that expire on 6/28/2014
- Column D Contains the initials of a few different staff. I need to count several different staff (JB, MJ, and JG)

I created a custom named range named GROUNDSTAFF that points to cells which have the specific initials I want to count, but my count always returns zero.

I.e. - I want to count all the ground levels that expire 6/28/2014 from only the staff JB, MJ, and JG. Is there a way around my issue while still using 1 formula?

Thank you,

Greemo
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
See if this works:

=SUMPRODUCT(COUNTIFS(B:B,"ground",C:C,"6/28/2014",D:D,GROUNDSTAFF))
 
Upvote 0
When you added GROUNDSTAFF it became an array formula. If you take your original formula and highlight it in the formula bar and press F9 (hit esc before you move to another cell) you will see something like {1,1,0,1,0,1}.
The SUMPRODUCT will add the ones to give your count.
 
Upvote 0
When you added GROUNDSTAFF it became an array formula. If you take your original formula and highlight it in the formula bar and press F9 (hit esc before you move to another cell) you will see something like {1,1,0,1,0,1}.
The SUMPRODUCT will add the ones to give your count.

Hi AhoyNC,

I want to extend my table by adding another row (column E). This column would tell me if the staff initials from the table is part of the GROUNDSTAFF range.

How do I go about this? Something like?:
=IF(D2=GROUNDSTAFF,"On Groundstaff","")

Greemo
 
Upvote 0
Try

=IF(ISNUMBER(MATCH(D2,GROUNDSTAFF,0)),"On Groundstaff","")
 
Upvote 0
You're welcome. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,725
Members
448,987
Latest member
marion_davis

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