Mar 22 2022 10:26 PM
I have a spreadsheet that identifies all cattle into different classes eg; Cow Bull etc.
I want to use Countifs to select the number of animals by class @ a given date. I need to use Countifs with an OR in relation Date of Sale OR( DOS being blank or DOS being after the given date ):-
=COUNTIFS(tbl_CReg[Class],"Cow",tbl_CReg[DOS],OR(tbl_CReg[DOS]">="&$H$3,ISBLANK(tbl_CReg[DOS])))
I Cant get the logic for the OR function to work..$H$3 is a date.
Mar 22 2022 10:49 PM - edited Mar 23 2022 01:32 AM
Solution@jonh54 COUNTIFS is designed to return the count when ALL criteria are met. The OR logic will thus not work here. You'll need to sum individual COUNTIFS statements. Such a formula would then look like this:
=COUNTIFS(tbl_CReg[Class],"Cow",tbl_CReg[DOS],"")+COUNTIFS(tbl_CReg[Class],"Cow",tbl_CReg[DOS],">"&$H$3)
Mar 23 2022 12:16 AM
Mar 22 2022 10:49 PM - edited Mar 23 2022 01:32 AM
Solution@jonh54 COUNTIFS is designed to return the count when ALL criteria are met. The OR logic will thus not work here. You'll need to sum individual COUNTIFS statements. Such a formula would then look like this:
=COUNTIFS(tbl_CReg[Class],"Cow",tbl_CReg[DOS],"")+COUNTIFS(tbl_CReg[Class],"Cow",tbl_CReg[DOS],">"&$H$3)