Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default sum if column is equal to 2 options

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
  #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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default sum if column is equal to 2 options

Thanks Max. This done the trick.

"Max" wrote:

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

  #4   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

Welcome. Take a moment to press the "Yes" button below.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,200 Files:354 Subscribers:53
xdemechanik
---
"jimar" wrote:
Thanks Max. This done the trick.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
highlight column A if column A does not equal to B liu New Users to Excel 3 May 2nd 08 12:29 AM
Need to sum a column if two cells in row are equal [email protected] Excel Worksheet Functions 1 September 24th 06 05:36 PM
first number in a column not equal to zero James Fullmer New Users to Excel 4 June 10th 06 07:36 AM
How do I get text to equal a number so I can sum a column? jimi Excel Discussion (Misc queries) 5 June 10th 06 01:43 AM
getting excel to print text equal to a column LadyDiby Excel Discussion (Misc queries) 0 April 11th 05 09:27 PM


All times are GMT +1. The time now is 02:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"