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

user3334256 picture user3334256 · Feb 20, 2014 · Viewed 64.3k times · Source

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!

Answer

Dmitry Pavliv picture Dmitry Pavliv · Feb 20, 2014

You were almost there:

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