excel sum all cells where another cell contains a string -
excel sum all cells where another cell contains a string -
example table:
| | b -------------------------- 1 | 26 | tom, jerry -------------------------- 2 | 12 | tom -------------------------- 3 | 6 | jerry, tom, dicksuppose have table. trying sum total of cells in column cell of same row in column b contains name, illustration "tom". however, before cell in column added total, has divided number of names in column b.
so example, if used name jerry, total of:
(26/2) + (6/3) = 15
if used name tom, total of:
(26/2) + 12 + (6/3) = 27
please help! thinking perhaps might complex , might need split up.
assuming name in cell c1, formula job:
=sum($a$1:$a$3*not(iserror(search(c1,$b$1:$b$3)))/(len($b$1:$b$3)-len(substitute($b$1:$b$3,",",""))+1))you need come in array formula, i.e. press ctrl-shift-enter.
string excel if-statement split sum
Comments
Post a Comment