Eat More Bacon
New Member
How can I search column A for any cell that contains Tylan and then Sum the results in column B?
Attachments

11.1 KB Views: 3
=COUNTIF(A1;"*Tylan*")*C1
=SUMIF(A1:A7,"*Tylan*",C1:C7)
In addition, SUMIFS is slightly more logic too. The first argument is the sum range, the following arguments are the if conditions. So it is SUM, IFS. In the sless version it is the opposite and the sum range is at the end.Sum for values in Column C, and search Column A that contains "Tylan", and put the result in column B
In B1, enter formula ( the result will return as same as John 's solution. )
=SUMIFS(C:C,A:A,"*Tylan*")
The difference between Sumif and Sumifs is :
 Sumif only work for single criteria
 Sumifs can work for single and multiple criteria, and is a newer function in replacement of Sumif
= LET(
Word2ndλ, LAMBDA(s, INDEX(TEXTSPLIT(s, " "),2)),
SumIfλ, LAMBDA(q,m, LAMBDA(m₀, SUM(IF(m=m₀,q)))),
tblMed, MAP(Table1[Med], Word2ndλ),
tblQty, Table1[Qty],
distinctMed, UNIQUE(tblMed),
quantity, MAP(distinctMed, SumIfλ(tblQty,tblMed)),
HSTACK(distinctMed, quantity)
)