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

I am trying to average time for multiple entries over a year. I have about
10,000 records with the date and a total time. On my next sheet I have the
start date and end date for each week of that year columns A&B respectivly.
The formula below returns a result but it is wrong. I ran an average for the
first week to conform it and it is off by more than 20 seconds. Can anyone
show me what I did wrong. Thank you

{=AVERAGE(IF(Sheet1!A$2:A$5310=Sheet2!A2,IF(Sheet 1!B$2:B$5310<=Sheet2!B2,Sheet1!I$2:I$5310)))}
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Conditional Average

Looks fine, but maybe try this variation

=AVERAGE(IF((Sheet1!A$2:A$5310=Sheet2!A2)*(Sheet1 !B$2:B$5310<=Sheet2!B2),Sh
eet1!I$2:I$5310))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jason" wrote in message
...
I am trying to average time for multiple entries over a year. I have about
10,000 records with the date and a total time. On my next sheet I have the
start date and end date for each week of that year columns A&B

respectivly.
The formula below returns a result but it is wrong. I ran an average for

the
first week to conform it and it is off by more than 20 seconds. Can anyone
show me what I did wrong. Thank you


{=AVERAGE(IF(Sheet1!A$2:A$5310=Sheet2!A2,IF(Sheet 1!B$2:B$5310<=Sheet2!B2,Sh
eet1!I$2:I$5310)))}


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Conditional Average

Try this amendment to your formula:

=AVERAGE(IF((Sheet1!A$2:A$5310=Sheet2!A2)*(Sheet1 !B$2:B$5310<=Sheet2!B2),Sheet1!I$2:I$5310))

As this is an array formula then once you have typed it in (or
subsequently edit it) you must use CTR-SHIFT-ENTER instead of just
ENTER. If you do this correctly, Excel will wrap curly braces { }
around the formula - you must not type these yourself.

Hope this helps.

Pete

Jason wrote:
I am trying to average time for multiple entries over a year. I have about
10,000 records with the date and a total time. On my next sheet I have the
start date and end date for each week of that year columns A&B respectivly.
The formula below returns a result but it is wrong. I ran an average for the
first week to conform it and it is off by more than 20 seconds. Can anyone
show me what I did wrong. Thank you

{=AVERAGE(IF(Sheet1!A$2:A$5310=Sheet2!A2,IF(Sheet 1!B$2:B$5310<=Sheet2!B2,Sheet1!I$2:I$5310)))}


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Conditional Average

Oh, I see Bob beat me to it - he types too fast !! <g

Pete

Pete_UK wrote:
Try this amendment to your formula:

=AVERAGE(IF((Sheet1!A$2:A$5310=Sheet2!A2)*(Sheet1 !B$2:B$5310<=Sheet2!B2),Sheet1!I$2:I$5310))

As this is an array formula then once you have typed it in (or
subsequently edit it) you must use CTR-SHIFT-ENTER instead of just
ENTER. If you do this correctly, Excel will wrap curly braces { }
around the formula - you must not type these yourself.

Hope this helps.

Pete

Jason wrote:
I am trying to average time for multiple entries over a year. I have about
10,000 records with the date and a total time. On my next sheet I have the
start date and end date for each week of that year columns A&B respectivly.
The formula below returns a result but it is wrong. I ran an average for the
first week to conform it and it is off by more than 20 seconds. Can anyone
show me what I did wrong. Thank you

{=AVERAGE(IF(Sheet1!A$2:A$5310=Sheet2!A2,IF(Sheet 1!B$2:B$5310<=Sheet2!B2,Sheet1!I$2:I$5310)))}


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 367
Default Conditional Average

Thank you I tried it and I got the same result as my orginal formula. When I
run just a staight average of the first weeks numbers I get 6:26 when I put
yours and my formula in I get 6:13. I am at a lose. Jay

"Bob Phillips" wrote:

Looks fine, but maybe try this variation

=AVERAGE(IF((Sheet1!A$2:A$5310=Sheet2!A2)*(Sheet1 !B$2:B$5310<=Sheet2!B2),Sh
eet1!I$2:I$5310))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jason" wrote in message
...
I am trying to average time for multiple entries over a year. I have about
10,000 records with the date and a total time. On my next sheet I have the
start date and end date for each week of that year columns A&B

respectivly.
The formula below returns a result but it is wrong. I ran an average for

the
first week to conform it and it is off by more than 20 seconds. Can anyone
show me what I did wrong. Thank you


{=AVERAGE(IF(Sheet1!A$2:A$5310=Sheet2!A2,IF(Sheet 1!B$2:B$5310<=Sheet2!B2,Sh
eet1!I$2:I$5310)))}





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Conditional Average

Didn't help though :-)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Pete_UK" wrote in message
ups.com...
Oh, I see Bob beat me to it - he types too fast !! <g

Pete

Pete_UK wrote:
Try this amendment to your formula:


=AVERAGE(IF((Sheet1!A$2:A$5310=Sheet2!A2)*(Sheet1 !B$2:B$5310<=Sheet2!B2),Sh
eet1!I$2:I$5310))

As this is an array formula then once you have typed it in (or
subsequently edit it) you must use CTR-SHIFT-ENTER instead of just
ENTER. If you do this correctly, Excel will wrap curly braces { }
around the formula - you must not type these yourself.

Hope this helps.

Pete

Jason wrote:
I am trying to average time for multiple entries over a year. I have

about
10,000 records with the date and a total time. On my next sheet I have

the
start date and end date for each week of that year columns A&B

respectivly.
The formula below returns a result but it is wrong. I ran an average

for the
first week to conform it and it is off by more than 20 seconds. Can

anyone
show me what I did wrong. Thank you


{=AVERAGE(IF(Sheet1!A$2:A$5310=Sheet2!A2,IF(Sheet 1!B$2:B$5310<=Sheet2!B2,Sh
eet1!I$2:I$5310)))}



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
Conditional Average Array with Dates, <blanks, 0 tangomj Excel Worksheet Functions 7 July 14th 06 06:26 PM
Conditional Average across worksheets madduck Excel Worksheet Functions 3 July 13th 06 07:03 AM
Average a group, where grouping is Conditional on other col.??? tommot82 Excel Discussion (Misc queries) 1 June 9th 06 11:41 AM
Conditional math using AND, Average Team ZR-1 Excel Worksheet Functions 12 January 19th 06 10:59 PM
Conditional Average MEK911 Excel Worksheet Functions 4 September 9th 05 05:23 PM


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