need help in formula
"kyoko" wrote:
i need the number of "cover" from oct 27 to oct 29 that falls
under -50 only.
It is not clear whether column A has actual dates formatted as "mmm dd", or
if it contains text of the form "oct 27".
Assuming column A contains actual dates, perhaps the following will work for
you, assuming you example data are in rows 2-7:
=SUMPRODUCT((D1<=A2:A7)*(A2:A7<=D2)*(B2:B7<=-50)*(C2:C7="cover"))
whe
D1, starting date: Oct 27
D2, ending date: Oct 29
D1 and D2 should be entered the same way that you entered dates in column A.
Alternatively, instead of D1 and D2, you could use the DATE function,
namely: DATE(2009,10,27) and DATE(2009,10,29).
Note: That formula might seem to work even if column A contains text of the
form "oct 27". But that is only by coincidence. For example, it would not
work if the starting date was "oct 17" as text. "oct 2" would incorrectly
seem to be between "oct 17" and "oct 29".
If you do have dates in text form, I suggest that you change them to actual
dates. Otherwise, it is very difficult to implement a condition like
"between this date and that date".
Also note: You wrote "falls __under__ -50". If that is truly what you
meant, change "<=-50" above to "<-50". But then your example has no lines
that qualify. So I assume you meant "not over -50". Alternatively, if
"falls under -50" meant "is equal to -50", change "<=-50" to "=-50".
----- original message -----
"kyoko" wrote in message
...
i really need help for this one:
A B C
oct 27 -50 cover
oct 27 -50 not cover
oct 27 50 cover
oct 28 150 cover
oct 28 -100 cover
oct 29 -50 cover
in this case, i need the number of "cover" from oct 27 to oct 29 that
falls
under -50 only. is there any way to make it easier for me to get the
number
of it? please help me..i will appreciate it a lot..thanks in advance
|