numbers formula

I have been trying to create a formula to keep track of the amount of pigs that we sell and receive throughout the year. We have twelve pins that you can see listed on the “Total Head” tab with the combined total at the bottom. I would like each pin to correspond with the table on the “Moved” tab. As we receive or sell pigs, I would like the number that we move to be added or subtracted from the total in the corresponding pin on the “Total Head” page based on whether we sold or received. Any help would be appreciated

Posted on May 22, 2023 9:11 PM

Reply
Question marked as Top-ranking reply

Posted on May 22, 2023 9:35 PM



Formula in B2 of Table 1 on the "Total Head" sheet is

=SUMIFS(Moved::Table 1::D,Moved::Table 1::B,"Received",Moved::Table 1::C,$A2)−SUMIFS(Moved::Table 1::D,Moved::Table 1::B,"Sold",Moved::Table 1::C,$A2)

Fill down to complete the column, other than the last row

The last row is a footer row. The formula in B14 is =SUM(B)


It adds the "received" rows for the matching pin number and subtracts the "sold" rows for the matching pin number. I added a few more rows to the table on the Moved sheet so the totals would add up to what you showed for total head.

1 reply
Question marked as Top-ranking reply

May 22, 2023 9:35 PM in response to dane_hub



Formula in B2 of Table 1 on the "Total Head" sheet is

=SUMIFS(Moved::Table 1::D,Moved::Table 1::B,"Received",Moved::Table 1::C,$A2)−SUMIFS(Moved::Table 1::D,Moved::Table 1::B,"Sold",Moved::Table 1::C,$A2)

Fill down to complete the column, other than the last row

The last row is a footer row. The formula in B14 is =SUM(B)


It adds the "received" rows for the matching pin number and subtracts the "sold" rows for the matching pin number. I added a few more rows to the table on the Moved sheet so the totals would add up to what you showed for total head.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

numbers formula

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.