View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Average Daily Balance

Try something like this:

With
A2:A50 containing chronological activity dates (with some gaps for days with
no activity) or blanks for future days
B2:B50 containing deposit and withdrawal activity for the corresponding dates

and...
D1: Start
E1: (the first date to include for the calcs....eg 01/01/2007)
D2: End
E2: (the last date to include for the calcs....eg 01/31/2007)


D3: ADB
This formula returns the ending balance of the prior period PLUS the ADB of
the target period activity
E3:
=SUMIF(A2:A51,"<"&E1,B2:B51)+SUMPRODUCT((A2:A51=E 1)*(A2:A51<=E2)*(E2-A2:A51+1)*B2:B51)/(E2-E1+1)

Example:
For this activity
29-Dec-06 1000
01-Jan-07 10
04-Jan-07 -5
07-Jan-07 100
10-Jan-07 10
13-Jan-07 -5
16-Jan-07 10
19-Jan-07 100
22-Jan-07 10
25-Jan-07 100
28-Jan-07 -5
31-Jan-07 100
03-Feb-07 10

The calculated ADB for Jan 2007 is: 1,165.65

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"pwrichcreek" wrote:

I have a spreadsheet that lists checks and deposits in chronological sequence
and keeps a running balance of the account. Is there a function to calculate
the average daily balance for a selected range of dates?