How do you write the IF function in Excel and sum by condition with SUMIF? Syntax, arguments and examples based on Microsoft Support.