Summing based on criteria

J

jspizman

I am currently trying to reconfigure a dataset into something mor
managable for our regression needs. The issue I am having is trying t
automate as much of the data transfer as possible. The data set is se
up as follows (for example):

Yr Tag Value
0 2 #
1 2 #
2 3 #
3 3 #

0 1 #
1 1 #
2 1 #
3 1 #

etc. where tag is a special code we have developed based on the numbe
1, 2, 3, and 4

What I would like to do is develop a summing formula so in year 0 I ca
sum all the values if the tag is equal to 1 and then I would do that fo
the numbers 1 through 4 in my "compilation" worksheet.

Thanks for any help you can give,

Jos
 
D

Duke Carey

=sumproduct(--(A1:A1000=year),--(B1:B1000=tag),C1:C1000)

change the years and tags as appropriate
 
Top