The sum of data based on words

F

Flying Ace

I am working on a spreadsheet that has multiple pages within the workbook. It
is set up so that I can keep track of various information along with data.
What I am trying to do is calculate the sum of the data that is associated
with a word/phrase from two different cells Each sheet within the workbook is
different based on the month, and so some words/phrases may not appear each
month. For instance:


January (Sheet 1) February (Sheet 2)
A1 B1 A1 B1
Name Total Name Total
Pizza 2 Hot Dog 3
Hot Dog 5 Sandwich 2

I am wanting to create a sum total for each item without having to go
through each sheet and individually select the cells for a sum. Because the
cells could change or be different. I want the totals to be calculated in
occurance to the words that they are associated with.

Is there a possible formula to do this?
 
G

Gary''s Student

Use a sum of SUMPRODUCTS:

=SUMPRODUCT((Sheet1!A1:A300="pizza")*(Sheet1!B1:B300))+SUMPRODUCT((Sheet2!A1:A300="pizza")*(Sheet2!B1:B300))+SUMPRODUCT((Sheet3!A1:A300="pizza")*(Sheet3!B1:B300))
 
V

vezerid

Enter sheet names in a range of your target sheet, e.g. K1:K12

=SUMPRODUCT(SUMIF(INDIRECT(K1:K12&"!A:A"),"Pizza",INDIRECT(K1:K12&"!
B:B")))

HTH
Kostis Vezerides
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top