Forum Discussion

nnflstp's avatar
nnflstp
Copper Contributor
Oct 13, 2022

Countifs Based on Different Criteria Troubles

Need some help please! Trying to count data points based on two different sets of criteria and struggling.

 

Example: I need to count the total of Types that equal "Best" and where the End Date is within 30 days from today (note: I need to use "Today()" in formula or equivalent). I was able to write the formula for one cell, but when I try to rewrite it to encompass a range of cells, it won't work.

 

So....count # of records where A2:A4="Best" and where the End Date is less than or equal to 30 days from current day (B2:B4-Today()<=30). 

 

Based on the example data below,  the formula should return 2. Only two line items match both sets of criteria based on Today() being 10-13-22. Appreciate the help!!! Thanks

 

Type (ColA)End Date (ColB)
Best12-5-22
Worst10-1-22
Best11-2-22
Best10-31-22
    • nnflstp's avatar
      nnflstp
      Copper Contributor
      Thanks as well Hans. Totally was approaching the within 30 days calculation incorrectly.

Resources