if cell value is 1 then sum value of cells in excel code example Example: excel sum column if row contains =SUMIF(range,"*"&A1&"*",sum_range)