Forum Discussion
its_the_wil
Copper Contributor
=COUNTIFS(StaffTBL[Position],"Head Teacher",StaffTBL[Gender],"MALE",StaffTBL[Dec-2022],"Active")
StaffTBL: Table Name
Position, Gender, Dec-2022: Columns Name
i want to change the selection of the month column according to the current month ..so , i have column for months (Sep-2022,Oct-2022,.....Jul-2023) , i used countifs as shown above and i tried to change month column dynamically by using Hlookup formula inside countifs formula , and it worked ,but when the Hlookup brings column name it keeps put hidden quotes ("" "") at first and end of column name, if U use hlookup separately it will bring correct column name but when i put it inside countifs it brings column name as "StaffTBL[Dec-2022]"
StaffTBL: Table Name
Position, Gender, Dec-2022: Columns Name
i want to change the selection of the month column according to the current month ..so , i have column for months (Sep-2022,Oct-2022,.....Jul-2023) , i used countifs as shown above and i tried to change month column dynamically by using Hlookup formula inside countifs formula , and it worked ,but when the Hlookup brings column name it keeps put hidden quotes ("" "") at first and end of column name, if U use hlookup separately it will bring correct column name but when i put it inside countifs it brings column name as "StaffTBL[Dec-2022]"
HansVogelaar
Feb 02, 2023MVP
Does this do what you want?
=COUNTIFS(StaffTBL[Position],"Head Teacher",StaffTBL[Gender],"MALE",INDIRECT("StaffTBL["&TEXT(TODAY(),"mmm-yyyy")&"]"),"Active")
- its_the_wilFeb 02, 2023Copper Contributor
- HansVogelaarFeb 02, 2023MVP
So what do you want to use instead?