View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
tjtjjtjt
 
Posts: n/a
Default Easy way to count cells within date range

How about:
=SUMPRODUCT(--(G1:G466=K1),--(G1:G466<=K2))

Where the dates are in G1:G466 and the comparison dates are in K1 and K2.

--
tj


"wurstfreund" wrote:

Here's a challenge (perhaps):
My boss wants me to come up with the easiest way possible to count the
number of cells containing dates on a spreadsheet that fall within a date
range.
The only ways I might typically do this would involve using DCOUNT() or
COUNTIF(), both of which are a tad unweidly. Is there some easier way of
doing this?