Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Average days between dates

Greetings all,

I am working with two columns (ranges) of dates, although there are many
blank rows interspersed in both ranges. I simply need to calculate the
overall average days elapsed between the two columns. In other words, I'm
looking for a single result here; Col. B (End date) - Col. A (Start date) for
as many rows of dates that exist.

COL A (Start) COL B (End)
01/05/09 02/20/09
03/12/09 03/09/09

01/15/09 01/30/09
02/19/09 02/22/09

The array formula I'm using (below) works, but is factoring in the blank
cells and is giving me a lower inaccurate result.

{=AVERAGE((B$2:B$100)-(A$2:A$100))}

Any help at all would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 896
Default Average days between dates

presuming blanks are always in neighbouring A and B

=AVERAGE(IF(ISBLANK(B1:B4),"",B1:B4-A1:A4))

CTRL+SHIFT+ENTER it as it is an array formula



On 22 Maj, 14:56, mckzach wrote:
Greetings all,

I am working with two columns (ranges) of dates, although there are many
blank rows interspersed in both ranges. *I simply need to calculate the
overall average days elapsed between the two columns. *In other words, I'm
looking for a single result here; Col. B (End date) - Col. A (Start date) for
as many rows of dates that exist.

COL A (Start) *COL B (End)
01/05/09 * * * *02/20/09
03/12/09 * * * *03/09/09

01/15/09 * * * *01/30/09
02/19/09 * * * *02/22/09

The array formula I'm using (below) works, but is factoring in the blank
cells and is giving me a lower inaccurate result.

*{=AVERAGE((B$2:B$100)-(A$2:A$100))}

Any help at all would be appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default Average days between dates

=SUMPRODUCT(B2:B100-A2:A100)/SUMPRODUCT(--(B2:B100<""),--(A2:A100<""))

should get it. If it still account for the blank cells, they are not blank.
If the cell is, perhaps, " ", then you can either delete these or change the
sumproduct to < " "

"mckzach" wrote:

Greetings all,

I am working with two columns (ranges) of dates, although there are many
blank rows interspersed in both ranges. I simply need to calculate the
overall average days elapsed between the two columns. In other words, I'm
looking for a single result here; Col. B (End date) - Col. A (Start date) for
as many rows of dates that exist.

COL A (Start) COL B (End)
01/05/09 02/20/09
03/12/09 03/09/09

01/15/09 01/30/09
02/19/09 02/22/09

The array formula I'm using (below) works, but is factoring in the blank
cells and is giving me a lower inaccurate result.

{=AVERAGE((B$2:B$100)-(A$2:A$100))}

Any help at all would be appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 265
Default Average days between dates

Here's another way...

=AVERAGE(IF(B2:B6<"",B2:B6-A2:A6))

....confirmed with CONTROL+SHIFT+ENTER. Note that this formula allows
formula blanks ("").

--
Domenic
http://www.xl-central.com

In article ,
mckzach wrote:

Greetings all,

I am working with two columns (ranges) of dates, although there are many
blank rows interspersed in both ranges. I simply need to calculate the
overall average days elapsed between the two columns. In other words, I'm
looking for a single result here; Col. B (End date) - Col. A (Start date) for
as many rows of dates that exist.

COL A (Start) COL B (End)
01/05/09 02/20/09
03/12/09 03/09/09

01/15/09 01/30/09
02/19/09 02/22/09

The array formula I'm using (below) works, but is factoring in the blank
cells and is giving me a lower inaccurate result.

{=AVERAGE((B$2:B$100)-(A$2:A$100))}

Any help at all would be appreciated.

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 days between multiple dates Jman Excel Worksheet Functions 4 April 5th 08 03:46 AM
Calc days between two dates and exclude leap year days scoz Excel Worksheet Functions 5 November 23rd 07 03:58 PM
Conditional Formatting Dates calculating 10 days and 30 days from a certain date Sioux[_2_] Excel Worksheet Functions 2 October 11th 07 02:04 PM
Average Days Open IF between dates kathi Excel Worksheet Functions 1 November 16th 06 11:37 AM
AVERAGE DAYS OPEN IF BETWEEN DATES kathi Excel Worksheet Functions 4 February 28th 06 03:45 PM


All times are GMT +1. The time now is 07:34 AM.

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"