In MS Excel, I'm trying to make a wildcard search using the SUMIF
function. I'm following
I have apple
as a criterion and want to find sum all the cells adjacent to one containing the word apple. My formula is:
=sumif(A2:A6, "*apple*", B2:B6)
Now, for some reason the result of the sum function amounts to nothing.
I also tried another test, which I think my error has to do with. If I type = "apple" = "*apple*", Excel returns
False`. The two are related, I think, but I don't see how I can solve my original problem.
Any help is much appreciated.
CodePudding user response:
Try
=sumif(b2:b6,"*apple*",a2:a6)
As according to your example you have the sum range first followed by the range you are controlling against.
That is the wrong way round for sumif().