Summing based on criteria

  • Thread starter Thread starter jspizman
  • Start date Start date
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
 
=sumproduct(--(A1:A1000=year),--(B1:B1000=tag),C1:C1000)

change the years and tags as appropriate
 

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

Back
Top