View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default How to calculate text according to multiple months?

One way...

Assumes no empty cells in the data range.

=SUMPRODUCT(--(MONTH(A1:A20)<=3),--(B1:B20="x"))

--
Biff
Microsoft Excel MVP


"Joona" wrote in message
...
Hello!

I', having a slight problem with my Excel-worksheet. I have a sheet with
data, like this:

A B
1.1.2010 X
2.2.2010 X
3.3.2010
4.4.2010 X


(A: DDMMYYYY)
How do I get Excel to count all the X:s in the first three months? I have
another sheet to gather this data in which I'm putting the formula.