View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Countif statement using dates

Hi,

The correct syntax for the first is

=COUNTIF(A1:A100,"<="&B1)

I don't understand what you are trying to do with the second formula,
perhaps you could explain.

Mike
"Thebaran" wrote:

I am trying to write an Countif statement that I will eventually turn into an
array. However, I am having problems with the dates. My statement now is:

Countif(A1:A100,"<=B1")

In this statement A1:A100 are all dates, and so is B1. The function just
gives me zero. However if I change the statement to:

Countif(A1:A100,"<=1/1/2009")

Then the statement works. If I physically type in the date it works fine,
but when I try to have it look up the date from another cell it doesn't work.
Any ideas?

Ulimately I want the equation to be



I need to get past the first error before I can proceed.