# Googlesheets Filter or Query, to select values matching a Row by value and Column by IsBetween date range

I'm attempting to make a general Profit and Loss report in GoogleSheets. The data I am using is in a Summary tab Summary by Purchase Category. Each row in Col A represent a category, and Col D:O represent months that expenses are stored at per category.

I'd like to have a To/From date filter, for various categories, such that I can get a sum of all data from the Summary by Purchase Category sheet such that it references all numbers within Summary by Purchase Category!D:O and between the date range of >=P & L Standard'!B3 and <=P & L Standard'!D3, populate P & L Standard'!D9 and beyond,

https://docs.google.com/spreadsheets/d/1Vz4ilugFb4uTn3o1HlMwqwNovCrWuEf2irxtJjaQB8U/edit?usp=sharing

An example here, With the date range in >=P & L Standard'!B3 and <=P & L Standard'!D3 of 2/1/23 & 4/1/23, such that a sum of the ranges is posted if C=G and if the H:S date range is between&equal-to B3 D3. The Green and Blue highlighted cells are summing numbers from placeholder data that I'm using to illustrate.

I am currently using placeholder data in P & L Standard!G:S, and I can get =sum(filter(H2:S4,C11=G2:G4) to sum everything across the data, but I cannot get the data between filters to work in tandem with the value=value filter. What must I do to get both filters working?

• Please edit the question for clarity. Include a specific formula that isn't working and what it is supposed to do. Dates are numbers so can be compared using mathematical operators such as <>= etc. Consider including a Minimal Reproducible Example (more clarity, less content). Commented Mar 6 at 2:42
• Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
– Community Bot
Commented Mar 6 at 2:43
• Consider providing input and expected output as plain text table in the question. Click here to create a table easily, which are easy to copy/paste. Avoid sharing links like spreadsheets, which make the question useless for others or images, which are hard to copy. Also, note that your email address can also be accessed by the public, if you share Google files. Commented Mar 8 at 9:43