# Excel Formula

Discussion in 'Business Applications' started by Kaly_mo, Nov 5, 2007.

Not open for further replies.

Joined:
Nov 5, 2007
Messages:
1
I am trying to find the formula to total up a sum between certain dates.

for example

In column A i have the dates
In column B i have the amounts paid in

I need to be able to click into a cell and use a formula to calculate the total amount in column B between certain dates in Column A.

EG: the amount paid in between 01/10/2007 and including 30/09/2008

i have tried the following but no sum comes out, =SUMIF(A:A,">01/10/2007and<30/09/2008",B:B)

Kaly

2. ### Gregor1234

Joined:
Jun 3, 2004
Messages:
237
I am not a very experienced Excel persion but I believe the problem is that the "criteria" argument used in the SumIF function is unable to combine logical expressions like you are trying to do:

Can Do ">6/30/2007" and can do "<11/1/2007"

But Can't do ">6/30/2007 AND <11/1/2007" at the same time

For you particular problem there still is a solution that uses the SumIf function

Add up ALL of the payments and then, using SumIf, subtract off those that fall before the start date and those that fall after then ending date

So to add all the payments between (including) June 1 '07 and Sept 30 '07:
Good:
=sum(B1:Bn) - sumif(A1:An,"<6/1/2007",B1:Bn) - sumif (A1:An,">9/30/2007",B1:Bn)

Now if you think about this approach you see that it isn't really necessary to sum all the payments and subtract off both ends, you only need to sum all the payments that fall on or after the start date and then subtract off those that fall after the end date.

Better:
=sumif(A1:An,">5/31/2007",B1:Bn) - sumif (A1:An,">9/30/2007",B1Bn)

As Seen On