View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default count if using columns not range of cells

=SUMPRODUCT(--(TEXT(A1:A100,"yyyymmm")="2008Jun"),--(B1:B100="Apple"))

--
__________________________________
HTH

Bob

"Opal" wrote in message
...
Hi,
Im trying to generate a count that will tell me how many of 'x' are in
column B only if column A's data are within a date range eg for the month
of
June.

A B
16-Jun-08 Apple
16-Jun-08 Pear
30-May-08 Apple
18-Jun-08 Orange
16-Jun-08 Apple
12-Apr-08 Pear

Thanks
--
Opal