How to select value by using SUMPRODUCT?
Using SUMPRODUCT:
=SUMPRODUCT(MAX((A1:A11=C1-3)*(A1:A11<=C1+3)*B1:B11))
Or, this array formula** :
=MAX(IF((A1:A11=C1-3)*(A1:A11<=C1+3),B1:B11))
** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)
--
Biff
Microsoft Excel MVP
"Eric" wrote in message
...
Does anyone have any suggestions on how to select value by using
SUMPRODUCT?
In column A, there is a list of date, and in column B, there is a list of
value, and
There is a given date in cell C1, and a given error range in cell D1.
I would like to select the date in column A with the highest value in
column
B based on the range from the date C1-D1 to the date C1+D1.
For example,
6 Oct 07 65 1 Oct 07 3
5 Oct 07 35
4 Oct 07 44
3 Oct 07 88
2 Oct 07 65
1 Oct 07 17
30 Sep 07 53
29 Sep 07 25
28 Sep 07 44
27 Sep 07 96
26 Sep 07 76
The given range is from 1 Oct 07 - 3 = [28 Sep 07] to 1 Oct 07 +3 = [4 Oct
07].
The highest value in column B within this range is 88, then return 3 Oct,
07
in cell E1.
Does anyone have any suggesitons?
Thanks in advance for any suggestions
Eric
|