=QUERY(ActiveMonth!A7:L,"select A,D where K matches 'Admission|Pending'",0)
I am using sheets name/tabs (January, February.. December).
ActiveMonth is a namedRange of a cell containing the Month Name (A1). I want to query the tab with the activeMonth name. If the ActiveMonth (A1) is January then the formula will run as =QUERY(January!A7:L,"select A,D where K matches 'Admission|Pending'",0)
.