excel sum code example Example 1: how to sum in excel eg. =SUM(B3+D14) Example 2: excel sumif =SUMIF (range, criteria, [sum_range])