COUNTIF Quandary

farabi

New Member
Joined
Dec 29, 2016
Messages
9
Hi All,


I am putting together a report that can be automatically repeated on a monthly basis from budget reports that I receive at the start of each month (which I'll call 'Budget Report').


I have managed to calculate the first value I need: the number of placements I have in a particular region at the start of the month. The formula is:


=SUM(COUNTIFS('[Report - November2016.XLSB]Main'!$A:$A,"South East",''[Report - November2016.XLSB]Main'!$I:$I,"Urgent",'[Report - November2016.XLSB]Main'!$M:$M,{">=$B7",""}))


This returns a count of placements in:
a) the South East,
b) in the 'Urgent' category, which
c) have not terminated until at least the Start of this month (that is, a count of cells greater than or equal to the first day of the present month, or blank, in a column of dates).


The next entry I need to prepare is along similar lines, but I cannot figure out how to do it.


In Budget Report I have a column, P, of provider names.


In another spreadsheet I'll call 'Contracts Reference', I have all of these providers in column A, with another column, H, detailing 'contract status' for each of these providers.


In this entry I am making I need to count the same as in my first entry (i.e. South East, Urgent, current at start of month) from Budget Report, but only those which ALSO have the contract status value 'Restricted' in Contracts Reference.


How do I do this?


Thanks. :)
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Re: COUNTIF Quandry

Try like this:

=SUM(COUNTIFS('[Report - November2016.XLSB]Main'!$A:$A,"South East",''[Report - November2016.XLSB]Main'!$I:$I,"Urgent",'[Report - November2016.XLSB]Main'!$M:$M,{">=$B7",""}),'[Report - November2016.XLSB]Main'!$P:$P,IF('[Contracts Reference.xlsx]Sheet1'!$H$2:$H$100="Restricted",'[Contracts Reference.xlsx]Sheet1'!$A$2:$A$100))

Needs to be confirmed with CTRL+SHIFT+ENTER

change references as required
 
Upvote 0
Re: COUNTIF Quandry

Thank you very much for your help, but it seems to be returning an identical figure to the first formula rather than a much, much smaller one.
 
Upvote 0
Did you confirm with CTL+SHIFT+ENTER?

You need to select the cell with the formula, press F2 key to select formula then hold down CTRl and SHIFT keys while pressing ENTER. If done correctly you will see curly braces like { and } around the formula in the formula bar
 
Upvote 0

Forum statistics

Threads
1,216,661
Messages
6,131,974
Members
449,692
Latest member
MAV57

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