Cell References in SUM(COUNTIFS) function with multiple criteria in one column

BlueHeron16

New Member
Joined
Apr 14, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have the following formula that works perfectly until I replace dates with cell references:
=SUM(COUNTIFS(HouseMstr[RELEASE_DATE],"<=2/29/2020",HouseMstr[RATIFIED_DATE],{"",">2/29/2020"},HouseMstr[SETTLEMENT_DATE],{"";">2/29/2020"}))

I use the following format for Criteria2 and Criteria3 cell references:
">"&'Report Parameters'!$B$2

I am able to replace the date with a cell reference for Criteria1, but when replacing dates with cell references for Criteria2 and Criteria3, I receive the "There's a problem with this formula" error message:
1586912129561.png


Below is my formula with a cell reference in Criteria1, and my attempt at a cell reference in Criteria2; I noted where the flashing cursor appears after closing the error message:
=SUM(COUNTIFS(HouseMstr[RELEASE_DATE],"<="&'Report Parameters'!$B$2,HouseMstr[RATIFIED_DATE],{"",">"[flashing cursor here]&'Report Parameters'!$B$2},HouseMstr[SETTLEMENT_DATE],{"";">2/29/2020"}))

All dates in my formula need to be changed to a cell reference. How is this possible?
The formula needs to return the count for all houses with a Release Date <=X AND Ratified Date that is blank or >X AND Settlement Date that is blank or >X.

Thank you for your help!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi. This should produce same result i believe:

=SUMPRODUCT(--((HouseMstr[RELEASE_DATE]<>"")*(HouseMstr[RELEASE_DATE]<'Report Parameters'!$B$2)),--((HouseMstr[RATIFIED_DATE]="")+(HouseMstr[RATIFIED_DATE]>='Report Parameters'!$B$2)),--((HouseMstr[SETTLEMENT_DATE]="")+(HouseMstr[SETTLEMENT_DATE]>='Report Parameters'!$B$2)))
 
Upvote 0
Solution
For your original formula, you can replace...

VBA Code:
{"",">"&'Report Parameters'!$B$2}

with

VBA Code:
CHOOSE({1,2},"",">"&'Report Parameters'!$B$2)

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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