JoyeNeedsHelp said:
I was trying to reduce the complexity of the formula for ease
of translation, but I guess you need more input: The goal of
the formula is IF the harvest date as $E$4 is within the "month"
(start 5/1/13 as $G$82) (end 5/31/13 as $G$83), then return a
revenue total, where $B$49 is the revenue per harvest.
There must be something more to it that you are not saying, because your
requirements above are easily met with the following formula:
=IF(AND('SH Harv Table'!E$4>=$G$82,'SH Harv Table'!E$4<=$G$83),
Shrimp!$B$49,0)
Note that I wrote E$4, not $E$4. If you intend to copy the formula across
columns F through M, the formula will adjust accordingly. In fact, you
might even write E4 instead of E$4, if you also intend to copy the formula
down rows 5, 6, etc.
As written, the comparison is always with $G$82 and $G$83, and the non-zero
result is always Shrimp!$B$49. If you need those to change as you copy the
formula across columns or down rows, you need to give us more information
about how those references should change.
JoyeNeedsHelp said:
....Or I added a row that created the =MONTH for the month/date
range Then entered the following formula:
=IF((P91=MONTH(P83)),555,0)
where 555 represents harvest revenue -- but I am getting "false"
false responses
I don't see how that jibes with your original formula. If you want
something like your original formula, you might write simply:
=IF(MONTH('SH Harv Table'!E$4)=MONTH($G$82),Shrimp!$B$49,0)
However, in the previous paragraph, you wrote "month" __with_quotes__. I
presume your intent is that the dates in G82 and G83 might not be literally
the first and last dates of a month; instead, they might be any "monthly"
period (and perhaps not even that); for example, 5/16/2013 to 6/15/2013. In
that case, MONTH() will not work you for.
-----
Is this helpful?
-----
PS: In your original posting, you wrote the range "06/01/14-06/30/13"
[sic]. I interpreted that literally to mean a period that spanned a
__year__ or so. Now I wonder if "14" is a typo, and you meant 06/01/13.
----- original message -----