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