I am trying to count the number of rows/records which had 'open' notes on a variable date, which involves checking for:
- A Closed Date in the future
- OR
- No Closed Date at all (blank cell)
There are other criterions which are straight forward and included in the COUNTIF, but I'm having trouble trying to get COUNTIF to recognise the Date in the future (Greater Than) because it uses a cell reference in the array, rather than a hard coded date manually typed into the formula.
I'm trying to avoid using COUNTIFS()+COUNTIFS() because the formula will get quite large and I'm hoping there must be a way of using the array part that will pick up a cell reference?
My current formula is:
{=IF(SourceSelected="A",SUM(COUNTIFS(Data[Notes on Case?],"Yes",Data[Received Date],"<="&D27,Data[Closed Date],{">&D27",""})),"")}
The formula is correctly picking up the Received Date less than or equal to cell D27 (the variable date), and also the Closed Date which is blank (""), but it doesn't pick up the Closed Date greater than cell D27 (the variable date). I think this is because it is enclosed in speech marks so COUNTIF thinks it's looking for a text value of ">&D27".
How can I get the array to recognise ">&D27" as "greater than cell D27" so that I can still use this handy OR element in the COUNTIF?
Bookmarks