conditional formula question

G

Guest

I'm trying to figure out the formula to sum values in column B that have a
certain range of dates listed in column A and also have a particular value in
column D. Here's the spreadsheet.

A . . . . B . . . . . . E
1 Date. .Amt. . . . . Type
2 5/1. . $23. . . . . .Blue
3 5/5. . .$52. . . . . .Red
4 5/20. .$12. . . . . Green
5 6/2. . $21. . . . . .Red
6 7/14. .$64. . . . . .Blue

So, for example, I want to have a cell show me the sum of all "blues" during
the period 5/1-5/31.

Any help would be greatly appreciated.
Thanks
 
S

Sandy Mann

Assuming that the Dates are real XL dates, (like 1/5/07 formatted to show as
m/d then use:

=SUMPRODUCT((MONTH(A2:A6)=5)*(C2:C6="Blue")*B2:B6)

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
G

Guest

Thanks Sandy! That works great.

Sandy Mann said:
Assuming that the Dates are real XL dates, (like 1/5/07 formatted to show as
m/d then use:

=SUMPRODUCT((MONTH(A2:A6)=5)*(C2:C6="Blue")*B2:B6)

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
S

Sandy Mann

Glad to help, thanks foe the feedback.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top