Why does this function using COUNTIF fail?

I have used the following successfully in Excel 2007 to determine if the name in cell A27 is found in the list of VAT registered names and determine if VAT is applicable and, if so, the amount.
The list vat_registered_names resides on a separate tab within the workbook, hence the \ (backslash)
Cell A27 is conditionally populated by selection from a list of names that varies according to the area postcode input to the file

=IF(COUNTIF(\vat_registered_names,A27)>0,ROUNDDOWN((J$24+H27)*0.2,2),0)

In Libreoffice 5.0.5.2 running under Lubuntu it returns Err:508 error in bracketing.

Any advice would be most welcome as we are trying to get away from using MS Office

Strange. LibO Calc should return an error #NAME? since the backslash is not used in such a context in LibO. Err: 508 is indicating a missing pair (parentheses).
You may name a cell range containing a list ‘vat_registered_names’ in one sheet. To also make it available in other sheets simply choose the ‘Scope’ ‘Document (Global)’ for the named expression.
There is another issue: A27 should not contain any of the special characters used for RegEx except if actually a RegEx is intended.
To get things finally clear I need an example file demonstrating the problem.

May be a weird escaping issue, causing Calc to miss the range name and continue reading, thus skip a parenthesis? The wiki page on escaping characters does not mention anything though.

I tried, of course, with a few versions, among them V 5.1.2.2. I did get the #NAME? indicator but no error code.
Simply try it again and it’s different. With 5.0.2.2 I now get a recognised formula typing all the function names in lower case - and Err:508. V5.1.2.2 is show ing upper case, but now also Err: 508. first. After editing twice (cut backslash, insert again) I have the #NAME? I am close to resigning.

I have checked that vat_registered_name is specified as being Global, then simply removing the \ (backslash) causes the problem to disappear. It is now working as expected.

Thank you very much for the clues that helped me solve it.