Need Help With Formula For Rent Ledger

I have a rent ledger sheet that lists all the rent due dates and amounts, both past and future as shown below. Each month there are two payments due, Column B on the 1st, and Column C on the 15th. At the bottom I have a running total of accumulated rent due from the beginning through what is then due, but I have to manually update it according to the current date because otherwise it would total the future amounts as well that are not due yet.


What I need is a formula that would automatically add up these two columns, but based on the then current date. So for example, if it was August 21, it would add up all the rent due in both columns through August 2023, but if it was earlier on August 14 (because the second column amount was not yet due) it would add up all rent from both columns through July, but only the first column in August.


Essentially, it would use the current date to determine what the total rent due was from the beginning of the sheet through the appropriate column.


I hope this is clear and that there's a formula I can use to have this done automatically. Thanks!



iMac 21.5″ 4K, macOS 13.4

Posted on Aug 21, 2023 8:11 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 26, 2023 12:01 PM

No need to make it complicated:

In B13: =SUMIF($A1:$A12,"<="&TODAY(),B1:B12)

In C13: =SUMIF($A1:$A12,"<="&TODAY()−14,C1:C12)


or if you don't want to have the subtotals, then a single formula:

= SUMIF($A1:$A12,"<="&TODAY(),B1:B12)+SUMIF($A1:$A12,"<="&TODAY()−14,C1:C12)


To consider the amount in column C just subtract 14 days to today's date to compare to the date in the first column (which is the first of the month even though only the month name is shown, unless you specifically entered another day.).


If today is the 14th, then the subtraction results in the last day of the past month, so we don't add the amount for this month in column C. If we're on the 15th or after, then the subtraction gives a result equal to or superior to the first of the month.


The way the date is displayed has no bearing on the calculation, it's just window-dressing. However when you enter a date you have to make sure you set the parts in the proper order.


11 replies
Question marked as Top-ranking reply

Aug 26, 2023 12:01 PM in response to mac_user_4ever

No need to make it complicated:

In B13: =SUMIF($A1:$A12,"<="&TODAY(),B1:B12)

In C13: =SUMIF($A1:$A12,"<="&TODAY()−14,C1:C12)


or if you don't want to have the subtotals, then a single formula:

= SUMIF($A1:$A12,"<="&TODAY(),B1:B12)+SUMIF($A1:$A12,"<="&TODAY()−14,C1:C12)


To consider the amount in column C just subtract 14 days to today's date to compare to the date in the first column (which is the first of the month even though only the month name is shown, unless you specifically entered another day.).


If today is the 14th, then the subtraction results in the last day of the past month, so we don't add the amount for this month in column C. If we're on the 15th or after, then the subtraction gives a result equal to or superior to the first of the month.


The way the date is displayed has no bearing on the calculation, it's just window-dressing. However when you enter a date you have to make sure you set the parts in the proper order.


Aug 23, 2023 9:44 PM in response to mac_user_4ever

Hi mac_user_4ever,

mac_user_4ever wrote:

my boss doesn't much care for extra sheets or hidden helper columns, for whatever reason.

I sympathise with you. You have a difficult assignment.


I tried every way I know to find a solution that fits the constraints set by your boss. I was not able to find a way to sum two columns without using helper columns that can then be hidden.


The problem I see is that column A does not distinguish between days of the month (day 1 and day 15).


Here is my suggestion. Use helper columns, hide them and then export to PDF. No-one can look "behind the curtain" in a PDF. PDF is a final presentation.


Here we go. Two helper columns, D and E.


Using the DATE function,

Formula in D2: DATE(TEXTAFTER($A2," "),MONTH(TEXTBEFORE($A2," ")),B$1)

Fill down and fill right.


Now for the SUMIF formulas.


Formula in Footer Cell B11: SUMIF(D,"<="&TODAY(),B)

Fill right to C11.


Hide columns D and E


Export to PDF and open in Preview


That is your presentation to your overbearing boss.


Good luck, or look up Johnny Paycheck: Take this job and shove it.

https://www.youtube.com/watch?v=eIjEauGiRLo

Skip the Ads.


Regards,

Ian.

Aug 24, 2023 9:55 PM in response to mac_user_4ever

Hi mac_user_4ever,


Forget the earlier formula.

SUMIF($A,"<="&TODAY(),C) (my version)

SUMIF(A2:A8,"<="&TODAY(),C2:C8) (your version)

That is only partly useful. As you correctly pointed out, it uses the first day of the month; if TODAY is before the 15th, it includes the 15th before it is due.


Using my latest solution, changed temporarily so that we can put in a pretend TODAY, just as a test.

Formula in B11: SUMIF(D,"<="&Pretend TODAY::$A1,B)

Fill right.

That is correct, because 25 August 2023 is later than the 15th day.

Column B SUMIF $9,600.00

Column C SUMIF $3,400.00


Using a pretend TODAY of 2 august 2023, the formula will include 1st August, but not 15th August.

Column B SUMIF $9,600.00

Column C SUMIF $2,550.00


Regards,

Ian.

Aug 22, 2023 6:25 AM in response to mac_user_4ever

Really appreciate your help.


Ok so that takes care of the first column due on the first, but how do we sum the second column that's due on the 15th? That would need its own formula, not the same as the one due on the 1st. Yours works now because we're after the 15th already, but if today was the 14th, then August would not be part of the total for Column C.


Also, since I'm in the US the date is second, not first, if you could please adjust everything for that format. Thanks!

Aug 23, 2023 7:35 AM in response to mac_user_4ever

Hi mac_user_4ever


Do not be constrained by a template.


You wrote:

"Unfortunately I am constrained to use the template I was given that lists the dates and rent on the same single route with the values as shown."


Fortunately, in Numbers we can do calculations "behind the curtain" on other Sheets (Tabs) and then create a final presentation that matches the required table.


It is late here and I must go to sleep. More tomorrow, and of course other users are welcome to reply.


Regards,

Ian.




Aug 24, 2023 6:58 AM in response to Yellowbox

Thanks for that solution! I might be onto something myself as well but wanted to ask, how can I get the last value from the SUMIF calculated in Column C? In other words, as in our case, the last value I would be looking for (based on today's date) is the cell containing the $850 from August 2023.



Put differently, when I use this formula you sent earlier SUMIF(A2:A8,"<="&TODAY(),C2:C8) I need to get the value of the last matching criteria, namely the $850 belonging to the row of August 2023.

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.

Need Help With Formula For Rent Ledger

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