SUMIFS with multiple criteria on different rows

commonproblems

New Member
Joined
Apr 25, 2018
Messages
7
Hi everyone,

i need help summing the population of birds whose age is greater than 60 weeks, on a row by row basis.

The data set is below:


ABCDEFGHIJKL
1PopulationAgeEggsFeedPopulationAgeEggsFeedPopulationAgeEggsFeed
2200076110100200061100100200050100100
3199077120100199062100100199051100100
4198078130100198063100100198051100100

<tbody>
</tbody>


So the answer for Row 1 is 4,000. this is a simplistic data set. The actual data set is very long.

thank you for you help!


<colgroup><col><col><col span="15"></colgroup><tbody>
</tbody>
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

ahennema

New Member
Joined
Sep 14, 2005
Messages
34
Office Version
365
Platform
Windows, MacOS
Hi everyone,

i need help summing the population of birds whose age is greater than 60 weeks, on a row by row basis.

The data set is below:


ABCDEFGHIJKL
1PopulationAgeEggsFeedPopulationAgeEggsFeedPopulationAgeEggsFeed
2200076110100200061100100200050100100
3199077120100199062100100199051100100
4198078130100198063100100198051100100

<tbody>
</tbody>


So the answer for Row 1 is 4,000. this is a simplistic data set. The actual data set is very long.

thank you for you help!


<colgroup><col><col><col span="15"></colgroup><tbody>
</tbody>

Try this formula: =sumproduct(--(B2:J2>60), A2:I2)
 

commonproblems

New Member
Joined
Apr 25, 2018
Messages
7
Hi Ahennema,

thank you for your reply.

that doesn't solve the problem. it returns a value of 4,557, which is the sum of A2 to H2.
 

StephenCrump

Well-known Member
Joined
Sep 18, 2013
Messages
3,759
Office Version
365
Platform
Windows
Try: =SUMIFS(E2:M2,B$1:J$1,"Age",B2:J2,">60")
 

commonproblems

New Member
Joined
Apr 25, 2018
Messages
7
Hi StephenCrump,

Thank you as well for the reply.

When I've extrapolated the formula to the large data set, this didn't solve the issue either - sorry.
 

StephenCrump

Well-known Member
Joined
Sep 18, 2013
Messages
3,759
Office Version
365
Platform
Windows
When I've extrapolated the formula to the large data set, this didn't solve the issue either - sorry.
Not a problem for me.

But if you want further assistance, perhaps you'd like to give us more information about your data set? We have nothing to go on except for what you've posted.
 

commonproblems

New Member
Joined
Apr 25, 2018
Messages
7
Hi StephenCrump

Here is a snip of the data:

https://www.dropbox.com/s/yfh4jrqqicln5qb/Capture.PNG?dl=0

I need to sum the population of the flocks aged more than 60 weeks old on a week by week basis. For the first week, Row 25, the answer should be the population of flock 49 (2,151) and the population of flock 50 (2,182), total = 4,333.

the answer to the second week, row 26, is flock 49 (2,147), flock 50 (2,178) and flock 51 (2,213) = 6,538


thank you
 

StephenCrump

Well-known Member
Joined
Sep 18, 2013
Messages
3,759
Office Version
365
Platform
Windows
First row: =SUMIFS(B25:R25,C$24:S$24,"Age (Wks)",C25:S25,">60")

Note this requires an exact match on all the headers, so probably slightly safer to use:

=SUMPRODUCT(B25:R25,--(TRIM(C$24:S$24)="Age (Wks)"),--(C25:S25>60))
 

Watch MrExcel Video

Forum statistics

Threads
1,099,549
Messages
5,469,368
Members
406,647
Latest member
ssinovec

This Week's Hot Topics

Top