Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel countif date in cell is greater than or equal to date in another cell

This has been killing me for a while now. I just need to count a cell if the date in that cell is greater than or equal to a date in another cell (minus x days).

For example:

A1 2/20/2014

B1 1/20/2014

=COUNTIF(B1, ">=A1-30")

-30 would be minus 30 days. This obviously does not work. Help is greatly appreciated. Thanks!

like image 679
user3334256 Avatar asked Feb 20 '14 19:02

user3334256


People also ask

Can you use Countif with dates in Excel?

The Excel COUNTIFS function returns the count of cells that meet one or more criteria. COUNTIFS can be used with criteria based on dates, numbers, text, and other conditions.


1 Answers

You were almost there:

=COUNTIF(B1, ">=" & A1-30)
like image 170
Dmitry Pavliv Avatar answered Nov 15 '22 08:11

Dmitry Pavliv