LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default select date range then find average of values in another cell

On May 3, 4:12 pm, rob117 wrote:
On 3 May, wrote:



On May 3, 1:30 pm, rob117 wrote:


Hi,


I hope someone can help me.


I have a spreadsheet that has Dates in Column A - Eg 01/01/06 to
31/12/06.
Each date has a value next to it in Column B


Can you search for between specific dates and then average the values
in column B that link to the dates in the range?


Many thanks in advance


Rob


Assume you have your earliest date in D1 and your latest in D2.
=SUMPRODUCT(B2:B366*(A2:A366=-D1)*(A2:A366<=D2))


HTH
Kostis Vezerides


Thank you for your reply.

The formulae you have given doesn't average the result though by the
amount of dates selected. It totals them all together.

Thanks

Rob


Rob,

Thanks for the feedback. This one will get the average:

=SUMPRODUCT(B2:B366*(A2:A366=-D1)*(A2:A366<=D2))/
SUMPRODUCT((A2:A366=-D1)*(A2:A366<=D2))

HTH
Kostis

 
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
select date range in column garlocd Excel Worksheet Functions 2 July 11th 06 06:23 AM
find an average from a range, utilizing all data 0 Chase Excel Worksheet Functions 4 October 27th 05 01:59 AM
Find dates in a range; then sum values in that range by a criteria Anders Excel Discussion (Misc queries) 4 October 21st 05 03:41 PM
date criteria to select range Kstalker Excel Worksheet Functions 30 August 23rd 05 07:19 AM
How to Select a relative range with Using "Find" and Offset() Dennis Excel Discussion (Misc queries) 7 July 27th 05 03:57 PM


All times are GMT +1. The time now is 06:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"