

September 26, 2016

Hi
I would like to Count cells that meet two criteria.
Range 1 is F21:F20000
Criteria is "Done" (text value)
Range 2 is E21:E20000
Criteria is C7-7 (note that this is taking the date specified in C7, and subtracting 7 days)
I keep getting formula errors with whatever I try, even COUNTIFS, COUNTIF, COUNTIF combined with AND, etc..
Any assistance would be appreciated.
Thanks very much, Gary

VIP

Trusted Members

June 25, 2016


VIP

Trusted Members

December 7, 2016

Hello Gary,
There must be something wrong in your data or more likely, your file.
As I try to show with below picture, with the criterias you mention it works fine using COUNTIFS.
As you can see, the date in cell C2 is text, still COUNTIF and COUNTIFS take that text date as a date, removes 7 days and looks for date 2018-03-01 when counting. So even when "wrong" it works fine. I am using Excel from Office 365 subscription, I can't tell if there is a difference with other versions.
Good luck with finding the error. Try using the Error Checking -->Trace Error tool in Formulas tab.
Br,
Anders

VIP

Trusted Members

December 7, 2016

Hi Gary,
I have checked your file and the array formula you have in cell H5 works. In case you want to change and use COUNTIFS then you can use following formula.
=COUNTIFS($H$11:$H$65502,"Done",$G$11:$G$65502,">"&$G$6-7)
The result will be 4, as there are four rows that have status "Done" and have a due date greater than February 8, 2018.
Not sure if this what you are after, but I have based it on the current array formula in cell H5.
Br,
Anders

Answers Post
1 Guest(s)
