Calc Error 504 when using function COUNTIF

Please anyone show me how to fix this. When I use the countif as syntax =COUNTIF($H$10:$H$110;"<=20/10/2016";$J$10:$J$110;“J10”), J10 is string of Text. The result is error 504. The same when i type the text string, like “Stay”.
Range H10:H110 are dates, J10:J110 are “Stay” or “Leave”.
I dont know that is enough info or not.
Tks in advance.

Really COUNTIF()? Four parameters? Indeed?

@JohnSUN is right, instead you should use COUNTIFS which can meet several parameters.

But it works with countif, due in my version of calc now there’s no Countifs, really. And when I type COUNTIFS the result is #NAME?.

If the answer solves your question please tick the :heavy_check_mark:.

@JohnSUN & @mariosv COUNTIFS works well in this situation. My error due to failure somewhere in LiO install. Now it works well. Tks

Please, can you tell me how exactly did you solved a problem?