Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gimiv
 
Posts: n/a
Default How do I obtain the Average Values between 2 dates?


I have 2 worksheets. One named Daily, one named weekly. The A columns of
both sheets have dates. Daily has every business day (including
holidays) and weekly has every Friday(including holidays). The B
columns contain volume that coorelates with the dates. What I would
like to do is take the Average values between 2 Fridays and put them
into the weekly worksheet. I had success with the first week because I
was only searching on one criteria, but when I tried to search between
dates, no luck. This is the formula that worked for the first cell:
{=AVERAGE(IF(Daily!$A$4:$A$604<=Weekly!A4,Daily!$B $4:$B$604))}


Here is the formula I attempted the DID NOT work in calculating the
daily average of one weeks voume.
{=AVERAGE(IF(AND(Daily!$A$4:$A$604<=Weekly!A5,Dail y!$A$4:$A$604Weekly!A4),Daily!$B$4:$B$604))}

Any ideas? FYI, I want to skip the blank cells(holidays) in my
calculations.

Thanks,

Gimi


--
gimiv
------------------------------------------------------------------------
gimiv's Profile: http://www.excelforum.com/member.php...o&userid=35726
View this thread: http://www.excelforum.com/showthread...hreadid=557138

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default How do I obtain the Average Values between 2 dates?

Try...

=AVERAGE(IF(Daily!$A$4:$A$604Weekly!A4,IF(Daily!$ A$4:$A$604
<=Weekly!A5,Daily!$B$4:$B$604)))

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article ,
gimiv wrote:

I have 2 worksheets. One named Daily, one named weekly. The A columns of
both sheets have dates. Daily has every business day (including
holidays) and weekly has every Friday(including holidays). The B
columns contain volume that coorelates with the dates. What I would
like to do is take the Average values between 2 Fridays and put them
into the weekly worksheet. I had success with the first week because I
was only searching on one criteria, but when I tried to search between
dates, no luck. This is the formula that worked for the first cell:
{=AVERAGE(IF(Daily!$A$4:$A$604<=Weekly!A4,Daily!$B $4:$B$604))}


Here is the formula I attempted the DID NOT work in calculating the
daily average of one weeks voume.
{=AVERAGE(IF(AND(Daily!$A$4:$A$604<=Weekly!A5,Dail y!$A$4:$A$604Weekly!A4),Dai
ly!$B$4:$B$604))}

Any ideas? FYI, I want to skip the blank cells(holidays) in my
calculations.

Thanks,

Gimi

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gimiv
 
Posts: n/a
Default How do I obtain the Average Values between 2 dates?


That worked, excellent. Thanks Domenic. One last thing, how do I get it
to ignore blank cells (holidays)


--
gimiv
------------------------------------------------------------------------
gimiv's Profile: http://www.excelforum.com/member.php...o&userid=35726
View this thread: http://www.excelforum.com/showthread...hreadid=557138

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default How do I obtain the Average Values between 2 dates?

Try...

=AVERAGE(IF(Daily!$A$4:$A$604Weekly!A4,IF(Daily!$ A$4:$A$604
<=Weekly!A5,IF(Daily!$B$4:$B$604<"",Daily!$B$4:$B $604))))

....confirmed with CONTROL+SHIFT+ENTER.

In article ,
gimiv wrote:

That worked, excellent. Thanks Domenic. One last thing, how do I get it
to ignore blank cells (holidays)

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gimiv
 
Posts: n/a
Default How do I obtain the Average Values between 2 dates?


It worked. Thanks again. One more thing. Is there a way to set it so
that if there are noe values to calculate, you don't get the #DIV/0!
error?


--
gimiv
------------------------------------------------------------------------
gimiv's Profile: http://www.excelforum.com/member.php...o&userid=35726
View this thread: http://www.excelforum.com/showthread...hreadid=557138



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Domenic
 
Posts: n/a
Default How do I obtain the Average Values between 2 dates?

Sure, try the following...

Insert Name Define

Name: BigNum

Refers to: =9.99999999999999E+307

Click Ok

Then try...

=LOOKUP(BigNum,CHOOSE({1,2},0,AVERAGE(IF(Daily!$A$ 4:$A$604Weekly!A4,IF(D
aily!$A$4:$A$604<=Weekly!A5,IF(Daily!$B$4:$B$604< "",Daily!$B$4:$B$604)))
)))

....confirmed with CONTROL+SHIFT+ENTER. The formula will return 0
instead of #DIV/0!. If you'd like the cell to be blank, you can custom
format the cell...

Format Cell Number Custom Type: [=0]""

Hope this helps!

In article ,
gimiv wrote:

It worked. Thanks again. One more thing. Is there a way to set it so
that if there are noe values to calculate, you don't get the #DIV/0!
error?

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
Summing values b/t two dates starguy Excel Discussion (Misc queries) 3 April 26th 06 07:39 AM
Can I obtain x values from y values on an Excel chart? Helen Charts and Charting in Excel 1 March 7th 06 03:05 PM
average on column if two others have given values vinnie123 Excel Worksheet Functions 2 March 2nd 06 11:50 PM
Calculate Years/Months Between Dates and then Average Missy Excel Discussion (Misc queries) 3 February 12th 05 04:19 AM
Convert three separate columns of values to dates jack Excel Worksheet Functions 3 February 3rd 05 11:30 PM


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