You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Choose a date range and a criteria to return a sum of values

Hello,


I am looking into making a personal file but find myself in a bit of trouble with Numbers functions.


I have a table that would look like that:


And I would like to be able to choose a date range (either two specific dates, or a specific month, or year), as well as one or multiple “Expense” criteria from the pop-up menu so that it adds together their price paid for that period of time.


I think it could look like that:


The more I think about it, the more I think it could be easier for me to have as many separated result tables as there are criteria so I can mix and match without bothering too much with heavy formulas, so that’s an option for sure.


Now I just don’t know how to refer to specific dates in formulas, and I would also like to be able to select a month or a year without having to type in “01/07/2021 - 31/07/2021” or “01/01/2021 - 31/12/2021” but “July” or “2021” instead (is that even possible?)


I can work on it either on Numbers for iPad or mac.


Thank you for your time if you read this!

iPad Pro, iPadOS 14

Posted on Jul 12, 2021 4:00 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 12, 2021 8:09 AM

From your description I'm not sure exactly what you are trying to do but here is simple example of summarizing data by month and year.




Formula in D2 of Transactions, filled down:


=MONTHNAME(MONTH(B2))


Formula in E2 of Transactions, filled down:


=YEAR(B2)


Formula in B2 of Summary-2021 an Summary-2022 tables filled or copied right and down:


=SUMIFS(Transactions::$C,Transactions::$A,$A2,Transactions::$D,B$1,Transactions::$E,$A$1)


Before entering the month name, be sure to format the cells with the month names in the Summary tables as text. Otherwise Numbers will guess that you mean specific dates, which won't match the month names in the Transactions table.


SG


Similar questions

1 reply
Question marked as Top-ranking reply

Jul 12, 2021 8:09 AM in response to Drotciv

From your description I'm not sure exactly what you are trying to do but here is simple example of summarizing data by month and year.




Formula in D2 of Transactions, filled down:


=MONTHNAME(MONTH(B2))


Formula in E2 of Transactions, filled down:


=YEAR(B2)


Formula in B2 of Summary-2021 an Summary-2022 tables filled or copied right and down:


=SUMIFS(Transactions::$C,Transactions::$A,$A2,Transactions::$D,B$1,Transactions::$E,$A$1)


Before entering the month name, be sure to format the cells with the month names in the Summary tables as text. Otherwise Numbers will guess that you mean specific dates, which won't match the month names in the Transactions table.


SG


Choose a date range and a criteria to return a sum of values

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