![]() |
Subtract if dates in the range between 2 dates.
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) -- Message posted via http://www.officekb.com |
Subtract if dates in the range between 2 dates.
TRY:
=IF(OR(A2="",A3=""),"",SUM(B2:D2)-SUMPRODUCT((A6:A9=A2)*(A6:A9<=A3)*(C6:E9))) HTH "inta251 via OfficeKB.com" wrote: 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) -- Message posted via http://www.officekb.com |
Subtract if dates in the range between 2 dates.
Thanks for respond.
Formula is working perfect. THANKS. =IF(OR(A2="",A3=""),"",SUM(B2:D2)-SUMPRODUCT((A6:A9=A2)*(A6:A9<=A3)*(C6:E9))) -- Message posted via http://www.officekb.com |
All times are GMT +1. The time now is 10:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com