Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
function tweak?
Hi there,
I use the following SumProduct formula to search for all values in a specified date range, in this case, for all values in january, then sum those values which fall into that date range: =SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")),'Daily Reading Master Log'!CB3:CB400) Question: I need to be able to adapt this formula for averaging a set of values for a specified month range. can anyone help me on this? -- Carlee |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
function tweak?
maybe like this:
I modified your original formula like this to get just the count: SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")) And then, divided the sum with the count: =SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")),'Daily Reading Master Log'!CB3:CB400)/SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")) -- Hope that helps. Vergel Adriano "Carlee" wrote: Hi there, I use the following SumProduct formula to search for all values in a specified date range, in this case, for all values in january, then sum those values which fall into that date range: =SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")),'Daily Reading Master Log'!CB3:CB400) Question: I need to be able to adapt this formula for averaging a set of values for a specified month range. can anyone help me on this? -- Carlee |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
function tweak?
One way:
=SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")),'Daily Reading Master Log'!CB3:CB400)/ SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01"))) "Carlee" wrote: Hi there, I use the following SumProduct formula to search for all values in a specified date range, in this case, for all values in january, then sum those values which fall into that date range: =SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")),'Daily Reading Master Log'!CB3:CB400) Question: I need to be able to adapt this formula for averaging a set of values for a specified month range. can anyone help me on this? -- Carlee |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
function tweak?
The formulas were missing one closing parenthesis. The formula to get the
count should be: SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01"))) The formula to get the average should be: =SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")),'Daily Reading Master Log'!CB3:CB400)/SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01"))) -- Hope that helps. Vergel Adriano "Vergel Adriano" wrote: maybe like this: I modified your original formula like this to get just the count: SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")) And then, divided the sum with the count: =SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")),'Daily Reading Master Log'!CB3:CB400)/SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")) -- Hope that helps. Vergel Adriano "Carlee" wrote: Hi there, I use the following SumProduct formula to search for all values in a specified date range, in this case, for all values in january, then sum those values which fall into that date range: =SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")),'Daily Reading Master Log'!CB3:CB400) Question: I need to be able to adapt this formula for averaging a set of values for a specified month range. can anyone help me on this? -- Carlee |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
function tweak?
On Mon, 16 Apr 2007 17:02:01 -0700, Carlee
wrote: Hi there, I use the following SumProduct formula to search for all values in a specified date range, in this case, for all values in january, then sum those values which fall into that date range: =SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")),'Daily Reading Master Log'!CB3:CB400) Question: I need to be able to adapt this formula for averaging a set of values for a specified month range. can anyone help me on this? How about something like: =(SUMIF(DtRng,"="&DATE(2007,1,1),ValRng)- SUMIF(DtRng,""&DATE(2007,2,0),ValRng))/ (COUNTIF(DtRng,"="&DATE(2007,1,1))- COUNTIF(DtRng,""&DATE(2007,2,0))) where DtRng = Log'!B3:B400 ValRng = 'Daily Reading Master Log'!CB3:CB400) In the above formula, I used the 0th day of the month following instead of the last day of the current month, as it's a bit simpler to compute -- you don't have to know how many days are in the current month. --ron |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
function tweak?
This worked brilliantly. Many thanks to everyone...you all rock!
-- Carlee "Barb Reinhardt" wrote: One way: =SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")),'Daily Reading Master Log'!CB3:CB400)/ SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01"))) "Carlee" wrote: Hi there, I use the following SumProduct formula to search for all values in a specified date range, in this case, for all values in january, then sum those values which fall into that date range: =SUMPRODUCT(--('Daily Reading Master Log'!B3:B400=DATEVALUE("01/01")),--('Daily Reading Master Log'!B3:B400<=DATEVALUE("30/01")),'Daily Reading Master Log'!CB3:CB400) Question: I need to be able to adapt this formula for averaging a set of values for a specified month range. can anyone help me on this? -- Carlee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need someone to help tweak a code | Excel Discussion (Misc queries) | |||
VBA File Search Function tweak | Excel Discussion (Misc queries) | |||
SUMPRODUCT - Tweak | Excel Worksheet Functions | |||
Array Help Tweak | Excel Worksheet Functions | |||
Code Tweak | Excel Programming |