Problem:

Listed in range A2:B9 are dates and expenses.
How could we total the expenses paid during each quarter in column D?

Solution:

Use the ROUNDUP and MONTH functions to find the dates included in each quarter and sum their matching expenses.
Following is the formula (Array Formula):
{=SUM((C2=ROUNDUP(MONTH($A$2:$A$9)/3,0))*$B$2:$B$9)}

Example:

Date__________Expense____Quarter_____Total Expenses
05/01/2004____200________1___________200
20/03/2004____150________2___________430
11/04/2004____30_________3___________255
11/06/2004____400________4___________200
22/08/2004____35
16/09/2004____220
02/11/2004____120
03/12/2004____80