A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

average if - between range



 
 
Thread Tools Display Modes
  #1  
Old June 2nd, 2010, 02:29 PM posted to microsoft.public.excel.worksheet.functions
Chris26
external usenet poster
 
Posts: 17
Default average if - between range

Hi
I have the following data
Col-A Col-B
1/10/2009 10:20 0.006
1/10/2009 10:22 0.007
1/10/2009 10:24 0.006
........
1/06/2010 15:00 0.015

etc
What I would like to be able to do, is to calculate the average of the
vaules in Col B only between certain time periods i.e. 2am and 4am for each
day in the data set

Any help appreciated.
Many Thanks
Chris
  #2  
Old June 2nd, 2010, 02:46 PM posted to microsoft.public.excel.worksheet.functions
Don Guillett[_2_]
external usenet poster
 
Posts: 607
Default average if - between range

=AVERAGE(IF((HOUR(F8:F28)=10)*(HOUR(F8:F28)11),G 8:G28))
An array formula that must be entered using ctrl+shift+enter
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Chris26" wrote in message
...
Hi
I have the following data
Col-A Col-B
1/10/2009 10:20 0.006
1/10/2009 10:22 0.007
1/10/2009 10:24 0.006
.......
1/06/2010 15:00 0.015

etc
What I would like to be able to do, is to calculate the average of the
vaules in Col B only between certain time periods i.e. 2am and 4am for
each
day in the data set

Any help appreciated.
Many Thanks
Chris


  #3  
Old June 3rd, 2010, 12:26 PM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default average if - between range

With start datetime in cell C1 and enddate time in cell D1 try the below
array formula. Press CTRL+SHIFT+ENTER to enter the formula. If successful in
'Formula Bar' you can notice the curly braces at both ends like "{=formula}"

=AVERAGE(IF((A1:A10=C1)*(A1:A10=D1),B1:B10))

--
Jacob (MVP - Excel)


"Chris26" wrote:

Hi
I have the following data
Col-A Col-B
1/10/2009 10:20 0.006
1/10/2009 10:22 0.007
1/10/2009 10:24 0.006
.......
1/06/2010 15:00 0.015

etc
What I would like to be able to do, is to calculate the average of the
vaules in Col B only between certain time periods i.e. 2am and 4am for each
day in the data set

Any help appreciated.
Many Thanks
Chris

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.