sum filter based on date

288enzo

Well-known Member
Joined
Feb 8, 2009
Messages
735
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

I'm working on a calendar view budget forecast and found a few helpful videos. One formula I found very helpful is:

Not an excel formula, wasn't sure what to use to properly format. This is in Google Sheets.

Excel Formula:
=IFERROR(SUM(FILTER(Recurring!$C$2:$C,
    (B5 >= Recurring!$E$2:$E) *
    (
        (Recurring!$G$2:$G = "Once") * (B5 = Recurring!$E$2:$E) +
        (Recurring!$G$2:$G = "Weekly") * (MOD(DAYS(B5, Recurring!$E$2:$E),7)=0)+
        (Recurring!$G$2:$G = "Monthly") * (DAY(B5)=DAY(Recurring!$E$2:$E))
    )
)),"")

What I need some assistance on is how to add another condition to the filter.

As an example, what I thought would work is:

Excel Formula:
=IFERROR(SUM(FILTER(Recurring!$C$2:$C,
    (B5 >= Recurring!$E$2:$E, B5 < Recurring!$F$2:$F) *
    (
        (Recurring!$G$2:$G = "Once") * (B5 = Recurring!$E$2:$E) +
        (Recurring!$G$2:$G = "Weekly") * (MOD(DAYS(B5, Recurring!$E$2:$E),7)=0)+
        (Recurring!$G$2:$G = "Monthly") * (DAY(B5)=DAY(Recurring!$E$2:$E))
    )
)),"")

Recurring!$E$2:$E = start date
Recurring!$F$2:$F = end date

Thank you!
 
Last edited by a moderator:
You need to multiply the conditions:

Excel Formula:
=IFERROR(SUM(FILTER(Recurring!$C$2:$C,
    (B5 >= Recurring!$E$2:$E) * (B5 < Recurring!$F$2:$F) *
    (
        (Recurring!$G$2:$G = "Once") * (B5 = Recurring!$E$2:$E) +
        (Recurring!$G$2:$G = "Weekly") * (MOD(DAYS(B5, Recurring!$E$2:$E),7)=0)+
        (Recurring!$G$2:$G = "Monthly") * (DAY(B5)=DAY(Recurring!$E$2:$E))
    )
)),"")
 
Upvote 0
Solution
You need to multiply the conditions:

Excel Formula:
=IFERROR(SUM(FILTER(Recurring!$C$2:$C,
    (B5 >= Recurring!$E$2:$E) * (B5 < Recurring!$F$2:$F) *
    (
        (Recurring!$G$2:$G = "Once") * (B5 = Recurring!$E$2:$E) +
        (Recurring!$G$2:$G = "Weekly") * (MOD(DAYS(B5, Recurring!$E$2:$E),7)=0)+
        (Recurring!$G$2:$G = "Monthly") * (DAY(B5)=DAY(Recurring!$E$2:$E))
    )
)),"")
Fantastic, thank you for the assist.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top