Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Averaging data if within a date range

Hi,

I want to average data on a monthly basis. My worksheet looks like this:

Q
"Offered"
8-Jun-06
14-Jun-06
15-Jun-06
3-Jul-06

R
Time to Fill ("TTF")
45
34
51
29

So I want to calculate the average of the data in column R ("TTF") if column
Q ("Offered") is between 1-Jun-06 and 30-Jun-06, and so on for each month.

Please help! I'm only self-taught on excel and this has got me completely
stuck!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Averaging data if within a date range

One way ..

Put in say, S2, array-enter* to confirm the formula:
=AVERAGE(IF(TEXT(Q2:Q100,"mmmyy")="Jun06",R2:R100) )
*Press CTRL+SHIFT+ENTER

Adapt the ranges to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"KellyF" wrote:
Hi,

I want to average data on a monthly basis. My worksheet looks like this:

Q
"Offered"
8-Jun-06
14-Jun-06
15-Jun-06
3-Jul-06

R
Time to Fill ("TTF")
45
34
51
29

So I want to calculate the average of the data in column R ("TTF") if column
Q ("Offered") is between 1-Jun-06 and 30-Jun-06, and so on for each month.

Please help! I'm only self-taught on excel and this has got me completely
stuck!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Averaging data if within a date range

Hi Max,

Thanks. That works in the same worksheet.

But what if I want to enter into a different worksheet? I just tried using
the range name "Offered" in place of Q2:Q100 and "TTF" in place of R2:R100
and it gives me a NUM error.

Any advice?

Thanks

"Max" wrote:

One way ..

Put in say, S2, array-enter* to confirm the formula:
=AVERAGE(IF(TEXT(Q2:Q100,"mmmyy")="Jun06",R2:R100) )
*Press CTRL+SHIFT+ENTER

Adapt the ranges to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"KellyF" wrote:
Hi,

I want to average data on a monthly basis. My worksheet looks like this:

Q
"Offered"
8-Jun-06
14-Jun-06
15-Jun-06
3-Jul-06

R
Time to Fill ("TTF")
45
34
51
29

So I want to calculate the average of the data in column R ("TTF") if column
Q ("Offered") is between 1-Jun-06 and 30-Jun-06, and so on for each month.

Please help! I'm only self-taught on excel and this has got me completely
stuck!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Averaging data if within a date range

On Fri, 19 Oct 2007 06:26:00 -0700, KellyF
wrote:

Hi,

I want to average data on a monthly basis. My worksheet looks like this:

Q
"Offered"
8-Jun-06
14-Jun-06
15-Jun-06
3-Jul-06

R
Time to Fill ("TTF")
45
34
51
29

So I want to calculate the average of the data in column R ("TTF") if column
Q ("Offered") is between 1-Jun-06 and 30-Jun-06, and so on for each month.

Please help! I'm only self-taught on excel and this has got me completely
stuck!


When you write "between" 1-Jun and 30-Jun I am assuming you mean to INCLUDE
those two dates and that you do not really mean "between".

Something like:

=(SUMIF(Q:Q,"="&date(2006,6,1),R:R) -
SUMIF(SUMIF(Q:Q,""&date(2006,6,30),R:R))
/
(COUNTIF(Q:Q,"="&date(2006,6,1))-COUNTIF(Q:Q,""&date(2006,6,30)))


--ron
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Averaging data if within a date range

It should work ok. Check that your defined ranges are equal in size and that
there are no error values within the 2 ranges
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"KellyF" wrote:
Hi Max,

Thanks. That works in the same worksheet.

But what if I want to enter into a different worksheet? I just tried using
the range name "Offered" in place of Q2:Q100 and "TTF" in place of R2:R100
and it gives me a NUM error.

Any advice?




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Averaging data if within a date range

I've just tried this:
=AVERAGE(IF(TEXT("Offered","mmmyy")="Jun06","TTF") ) in the other worksheet
but it gives 0 as the result (the result is 25).



"Max" wrote:

It should work ok. Check that your defined ranges are equal in size and that
there are no error values within the 2 ranges
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"KellyF" wrote:
Hi Max,

Thanks. That works in the same worksheet.

But what if I want to enter into a different worksheet? I just tried using
the range name "Offered" in place of Q2:Q100 and "TTF" in place of R2:R100
and it gives me a NUM error.

Any advice?


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Averaging data if within a date range

"KellyF" wrote:
I've just tried this:
=AVERAGE(IF(TEXT("Offered","mmmyy")="Jun06","TTF") )
in the other worksheet
but it gives 0 as the result (the result is 25).


In formulas, defined ranges are used "as-is" ie without double quotes

Try it like this, array-entered (CSE) as befo
=AVERAGE(IF(TEXT(Offered,"mmmyy")="Jun06",TTF))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
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
averaging range across sheets after transforming text to value Keith Excel Worksheet Functions 3 January 4th 07 07:51 PM
Sum data by date range david72 Excel Discussion (Misc queries) 1 April 24th 06 08:06 AM
Changing the range of several averaging functions Hellion Excel Discussion (Misc queries) 1 September 17th 05 02:12 PM
Selecting data within a date range mtaylor Excel Worksheet Functions 1 September 1st 05 12:17 PM
Averaging non-range positive data Susannah Excel Discussion (Misc queries) 1 February 15th 05 02:25 AM


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