yes i did but it's still not working.
Under "sheets" what should I write if I want sheets "1", "2", "3"?

=countif3d($M$2:$M$23,B$1 & $A2, Sheets)


should I write:

=countif3d($M$2:$M$23,B$1 & $A2, 1:3)

???

or something else?

thanks a lot!