I'm looking for a way to average the numerical numbers in one column, say B, only if the string in column A contains a certain text.
For example:
(In column A) (In column B)
Hello table . . . 1
Hello desk . . . 2
Bye table . . . 3
Bye desk . . . . 4
So if the criteria to average the numbers is "desk" the answer would be (2+4)/2=3.
What I came up with so far is:
=AVERAGEIF(A1:A5, SEARCH("desk",B1:B5),B1:B5)
but it returns an error because the SEARCH only takes one input.
Any suggestions?