This document explains how to use the IF function in Excel to calculate VAT based on product category, with different VAT rates applied depending on whether the product is electronic (4% VAT) or electrical (12.5% VAT). The IF function syntax allows you to specify an logical test (category in cell B2), a value if true (multiply price by 4%), and a value if false (multiply price by 12.5%). Quotes must be used for text but not for numbers. Practice is needed to properly use quotes, commas and brackets in the IF function syntax.