Subtract if dates in the range between 2 dates.

  • Thread starter inta251 via OfficeKB.com
  • Start date
I

inta251 via OfficeKB.com

A B C D
Row2 2/1/2007 $20.00 $5.00 $35.00
Row3 2/15/2007
Row4 $60.00
Row5
Row6 2/22/2007 $5.00 $4.00 $3.00
Row7 2/8/2007 $3.00 $1.50 $6.00
Row8 2/10/2007 $2.00 $8.00 $7.00
Row9 2/24/2007 $4.00 $2.00 $9.00

A2 and A3 dates
B4 – formula =IF(OR(A2="",A3=""),"",SUM(B2:D2))

Need add function to the formula in B4.
If one or more dates in range A6:A9 => A2 and <= A3
Subtract amount from matched dates in same row(s).

In this case result must be $32.50
If no dates matching in A6:A9 just do first function SUM(B2:D2)

Thanks in advance.
Sincerely, Igor (inta251)
 
T

Toppers

TRY:

=IF(OR(A2="",A3=""),"",SUM(B2:D2)-SUMPRODUCT((A6:A9>=A2)*(A6:A9<=A3)*(C6:E9)))

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top