View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default sum if column is equal to 2 options

One way
Assuming data in A1:C5, with real dates in col C
In say, E1:
=SUMPRODUCT((TEXT(C1:C5,"mmmyy")="May08")*((A1:A5= "apples")+(A1:A5="oranges")),B1:B5)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,000 Files:354 Subscribers:53
xdemechanik
---
"jimar" wrote:
Column A contains 3 types of data ie apples, oranges or lemons. Column B
contains the number of each item purchased and col C contains the date of
purchase. I need a formula which will count the total number of apples and
oranges purchased in May. (Answer should be 20) Grateful for any help.

Col A Col B Col C
apples 5 4/5/08
apples 6 6/5/08
lemons 4 7/5/08
apples 1 1/6/08
oranges 9 3/5/08