Google-sheets – Make a query argument work with arrayformula in Google Sheets

google sheetsgoogle-sheets-arrayformulagoogle-sheets-query

Can you help please?
I have worked out how to get the result I need, but how do I make them work with arrayformula? Here is my google sheet

This works for me in Y2:

=COUNT(QUERY('Feed from Register'!$B$2:$E, "select B where B > date '"&TEXT(TODAY()-ValidDatesOnRegister!$B$1,"yyyy-mm-dd")&"' and E contains '"&$W2&"' "))

But, however much I've tried, I can't make it work as an arrayformula down the column. If it's the and that's causing the problem, what approach do I need to take? IF or filter?

Help much appreciated…
enter image description here

Best Answer

It's not possible to make work your formula as an array formula so your alternative is to change the way that your calculation is done but perhaps the easier solution is just to do a fill down of your current formula.