G
Gavin Robertson
In Excel 97 I have a list of items (groceries, i.e. bread, milk, tea,
coffee, apples etc) in column A and their corresponding cost in column B. I
want to add the cost of all the items that are either "bread", "milk" or
"tea".
The following works:
=SUMIF(A1:A10,"bread",B1:B10)+SUMIF(A1:A10,"milk",B1:B10)+SUMIF(A1:A10,"tea"
,B1:B10)
but there has to be a more elegant solution - possibly an array formula? I
have tried various ways of building the OR function into the SUMIF function
but to no avail.
Any help would be greatly appreciated.
Gavin
coffee, apples etc) in column A and their corresponding cost in column B. I
want to add the cost of all the items that are either "bread", "milk" or
"tea".
The following works:
=SUMIF(A1:A10,"bread",B1:B10)+SUMIF(A1:A10,"milk",B1:B10)+SUMIF(A1:A10,"tea"
,B1:B10)
but there has to be a more elegant solution - possibly an array formula? I
have tried various ways of building the OR function into the SUMIF function
but to no avail.
Any help would be greatly appreciated.
Gavin