on the formula tab, in the function library group, click the Math & Trig button. click SUMIF. in the range argument box, type category. in the criteria box, type office expense. in the sum range argument box, type cost. click ok