how to sum in excel based on conditions code example Example: EXCEL sum WITH condition SUMIF(range, criteria, [sum_range])