D
David Lipetz
The following SUMPRODUCT formula produces the correct results but I'm
reasonably certain that there must be a more efficient way of constructing
the formula. There are basically two components to this formula separated by
the + sign. Each component performs the same calculation: the first part for
Class="MS" and the second part (after the +) for Class="MSTV". Isn't there a
way to construct the formula so that it would be calculated for Class="MS"
OR Class="MSTV" and eliminate the need for two steps? I tried to incorporate
the OR formula within the SUMPRODUCT formula but was unsuccessful.
=(SUMPRODUCT(--(Void="Normal"),--(MONTH(Date)=MONTH(B69)),--(Type="Invoice"),--(Class="MS"),(Sell)))-(SUMPRODUCT(--(Void="Normal"),--(MONTH(Date)=MONTH(B69)),--(Type="Return"),--(Class="MS"),(Sell)))+(SUMPRODUCT(--(Void="Normal"),--(MONTH(Date)=MONTH(B69)),--(Type="Invoice"),--(Class="MSTV"),(Sell)))-(SUMPRODUCT(--(Void="Normal"),--(MONTH(Date)=MONTH(B69)),--(Type="Return"),--(Class="MSTV"),(Sell)))
Ideas?
Thanks,
David
reasonably certain that there must be a more efficient way of constructing
the formula. There are basically two components to this formula separated by
the + sign. Each component performs the same calculation: the first part for
Class="MS" and the second part (after the +) for Class="MSTV". Isn't there a
way to construct the formula so that it would be calculated for Class="MS"
OR Class="MSTV" and eliminate the need for two steps? I tried to incorporate
the OR formula within the SUMPRODUCT formula but was unsuccessful.
=(SUMPRODUCT(--(Void="Normal"),--(MONTH(Date)=MONTH(B69)),--(Type="Invoice"),--(Class="MS"),(Sell)))-(SUMPRODUCT(--(Void="Normal"),--(MONTH(Date)=MONTH(B69)),--(Type="Return"),--(Class="MS"),(Sell)))+(SUMPRODUCT(--(Void="Normal"),--(MONTH(Date)=MONTH(B69)),--(Type="Invoice"),--(Class="MSTV"),(Sell)))-(SUMPRODUCT(--(Void="Normal"),--(MONTH(Date)=MONTH(B69)),--(Type="Return"),--(Class="MSTV"),(Sell)))
Ideas?
Thanks,
David