Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Average of days within a range

I have a spreadsheet with two series of dates, date_paid and date_rec.
The date_paid column has occurrences that are separated by 7 days. What
I am trying to do is get an average duration of payment for each
payment period. When I use the formula I wrote I get a -32 response,
i.e.
=AVERAGE((date_paid=A3)-(SUMPRODUCT((date_recA2)*(date_rec<=A3))))

Sheet 1

Date Received Date Paid
8/31/2005 9/14/2005
9/2/2005 9/14/2005
9/6/2005 9/14/2005
9/6/2005 9/21/2005
9/8/2005 9/21/2005
9/9/2005 9/21/2005
9/13/2005 9/21/2005
9/13/2005 9/21/2005
9/13/2005 9/21/2005
9/13/2005 9/21/2005
9/13/2005 9/21/2005
9/14/2005 9/21/2005
9/14/2005 9/21/2005
9/14/2005 9/21/2005
9/14/2005 9/21/2005
9/14/2005 9/21/2005

Sheet 2
A2 9/14/2005
A3 9/21/2005 -32
A4 9/28/2005
A5 10/5/2005
A6 10/12/2005
A7 10/19/2005
A8 10/26/2005

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernie Deitrick
 
Posts: n/a
Default Average of days within a range

The array formula - entered with Ctrl-Shift-Enter

=AVERAGE(IF(date_paid=A3,date_paid-date_rec))

shoudl work, assuming that the named ranges are the same size...

HTH,
Bernie
MS Excel MVP


wrote in message oups.com...
I have a spreadsheet with two series of dates, date_paid and date_rec.
The date_paid column has occurrences that are separated by 7 days. What
I am trying to do is get an average duration of payment for each
payment period. When I use the formula I wrote I get a -32 response,
i.e.
=AVERAGE((date_paid=A3)-(SUMPRODUCT((date_recA2)*(date_rec<=A3))))

Sheet 1

Date Received Date Paid
8/31/2005 9/14/2005
9/2/2005 9/14/2005
9/6/2005 9/14/2005
9/6/2005 9/21/2005
9/8/2005 9/21/2005
9/9/2005 9/21/2005
9/13/2005 9/21/2005
9/13/2005 9/21/2005
9/13/2005 9/21/2005
9/13/2005 9/21/2005
9/13/2005 9/21/2005
9/14/2005 9/21/2005
9/14/2005 9/21/2005
9/14/2005 9/21/2005
9/14/2005 9/21/2005
9/14/2005 9/21/2005

Sheet 2
A2 9/14/2005
A3 9/21/2005 -32
A4 9/28/2005
A5 10/5/2005
A6 10/12/2005
A7 10/19/2005
A8 10/26/2005



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
Average first n numbers in a range (there may be less than n numbe Mike A. M. Excel Discussion (Misc queries) 8 January 18th 06 02:55 PM
Array to named range conversion... i-Zapp Excel Discussion (Misc queries) 4 October 25th 05 09:09 PM
How do I average a range of cells when one cell contains #N/A hongkonglt Excel Discussion (Misc queries) 3 September 19th 05 02:13 AM
average of visible cells in a filtered range dave roth Excel Worksheet Functions 5 May 23rd 05 12:56 PM
Range of dates determine days DNSNIDER Excel Worksheet Functions 2 December 24th 04 03:07 AM


All times are GMT +1. The time now is 12:35 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"