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

sumif for several dates (Numbers)

Hi,


I am trying to sum up results for several dates in a table. Using Numbers for Mac, I have created my own "book" to keep track of my expenses. The data table contains dates and expenses. I want to add up the expenses for the same date, if more than one occur.

Using the SUMIF I have accomplished to to that (in a different table).

However, I'd now like to just enter three or four dates for one month and sum up expenses to that date, i.e. I need to expand the condition in my formula. (In the end I want to project my cash-flow and - subject to probably another question - add a projection for future development regarding the cash-flow.

Thus my idea to just pick key dates (first, middle and last of the month, maybe four dates) where I sum up the expenses (and income).


Anybody able to help me out?


I have managed to "manually" do that, but simply adding another SUMIF in the respective formula. This seems horribly difficult and time consuming though, especially as number won't acutally copy formulas "logically". So, I am looking for a better solution than to sum up SUMIFs...


Thanks in advance!

Cheers

M.

MacBook Pro (17-inch Mid 2009), iOS 9.2.1

Posted on Feb 13, 2016 8:00 AM

Reply
Question marked as Best reply

Posted on Feb 13, 2016 11:43 AM

Hello


You might introduce mark column to control sum and use SUMIF() with condition on the mark value. Something like the following.



User uploaded file



REPORT A1 mark A2 1 A3 2 A4 3 B1 sum [>=mark] B2 =SUMIF(DATA::C,">="&A2,DATA::B) B3 =SUMIF(DATA::C,">="&A3,DATA::B) B4 =SUMIF(DATA::C,">="&A4,DATA::B)




* Tables are built with Numbers v2.


Regards,

H

6 replies
Question marked as Best reply

Feb 13, 2016 11:43 AM in response to thor74hh

Hello


You might introduce mark column to control sum and use SUMIF() with condition on the mark value. Something like the following.



User uploaded file



REPORT A1 mark A2 1 A3 2 A4 3 B1 sum [>=mark] B2 =SUMIF(DATA::C,">="&A2,DATA::B) B3 =SUMIF(DATA::C,">="&A3,DATA::B) B4 =SUMIF(DATA::C,">="&A4,DATA::B)




* Tables are built with Numbers v2.


Regards,

H

Feb 13, 2016 3:07 PM in response to thor74hh

thor74hh wrote:


I'd now like to just enter three or four dates for one month and sum up expenses to that date, i.e. I need to expand the condition in my formula. (In the end I want to project my cash-flow and - subject to probably another question - add a projection for future development regarding the cash-flow.

Thus my idea to just pick key dates (first, middle and last of the month, maybe four dates) where I sum up the expenses (and income).



Hi thor 74hh,


If I understand your question correctly, you may find the SUMIFS function (not a series of SUMIF) helpful. For example:


User uploaded file



The formula in B4 of Table 2, copied to column C:


=SUMIFS(Table 1::$C,Table 1::$A,">="&B$2,Table 1::$A,"<="&B$3)


The formula in B5 of Table 2, copied to column C:

=SUMIFS(Table 1::$D,Table 1::$A,">="&B$2,Table 1::$A,"<="&B$3)


I laid out Table 2 horizontally because you mentioned you will be doing projections, and by convention projections typically go out to the right.


Note that the logic for SUMIFS is the same as for SUMIF, except that you have multiple column-condition pairs.


SG

Feb 14, 2016 2:09 AM in response to SGIII

SGIII,


Thanks for the quick reply. I am just about to go through you answer trying to figure out whether I understand all the steps.

It looks a bit more in the direction I was heading (without an extra "marker" column) and I will try out the SUMIFS formula.


Thanks for the help!


Again, greatful for the quick tipps on my problem!

Feb 14, 2016 4:07 AM in response to thor74hh

Hello


Here're revised tables which assign marks for dates based upon a predefined table that maps day-of-month to mark. If mark is to be determined by day of month, this should simplify record management.



User uploaded file



DATA (excerpt) A1 date A2 2016-02-01 B1 value B2 =RANDBETWEEN(1,10)*10 C1 mark C2 =IFERROR(INDEX(MARKS::B,MATCH(DAY(A2),MARKS::A,0)), IFERROR(INDEX(MARKS::B,MATCH(DAY(A2)-DAY(EOMONTH(A2,0))-1,MARKS::A,0)),""))




Regards,

H

sumif for several dates (Numbers)

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