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
In Libreoffice 126.96.36.199 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