Accrued Revenue Ageing Formula

ryansm05

Board Regular
Joined
Sep 14, 2016
Messages
148
Office Version
  1. 365
Platform
  1. Windows
Hi,

From the below, I need to work out the ageing of the balances. The figures in column M (highlighted yellow) are the values I'm looking to achieve, which incorporates the following:

1) The Bf balance in column C. For Project 1 this is 61 days for the £5,000.

2) The formula will understand that this balance was cleared for Project 1 in February (G4). Subsequently the ageing of Project 1 in Feb 19 reverts to 0.

3) The values in H4 and I4 (£2,500 x 2) are generated in Mar 19 and Apr 19 respectively, and therefore the ageing restarts.

4) At 31/05/2019 (M2) the ageing of Project 1 is 92 days. This is because the balance started to generate in H4 and has not yet been cleared.




I appreciate this is quite a complex request, so if anyone can help, it'd be much appreciated.

Cheers
Ryan
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
If you are going to put sample data on the forum please paste something we can copy paste straight into excel not a picture. Anyway lets take project 1. What happens if the brought forward balance is not cleared in full eg if they had only paid say 4000 in Feb? What is the answer required then?
 
Upvote 0
If you are going to put sample data on the forum please paste something we can copy paste straight into excel not a picture. Anyway lets take project 1. What happens if the brought forward balance is not cleared in full eg if they had only paid say 4000 in Feb? What is the answer required then?

Apologies for that Steve.

In your example, since the balance is not cleared in full, I would want the ageing to include the BF figure. Do you think that’s possible?

Thanks!
Ryan
 
Upvote 0
There must be something less intimidating but this works for your examples at least:

=IF(SUMPRODUCT(--(SIGN(F4:J4)=-1),-F4:J4)>=D4,SUM(INDEX($F$2:$J$2,MIN(IF(COLUMN(F4:J4)-COLUMN(F4)+1>MAX(IF(F4:J4<0,COLUMN(F4:J4)-COLUMN(F4)+1)),IF(F4:J4>0,COLUMN(F4:J4)-COLUMN(F4)+1)))):$J$2),SUM($F$2:$J$2,C4))

Requires CTRL-SHIFT-ENTER not just enter. Look for {} appearing around the formula if entered correctly.
 
Upvote 0
Hi Steve,

thanks so much for this - the formula is icnredible!


However, although it work it works in almost every instance, there are a few examples where it doesn't which are highlighted red.
For example, Project 2 should be 151 + 61 as the balance has not yet been reduced to 0 at any point. It's the opposite with Project 7. It seems they're almost defaulting to the 151.

3128313031
ProjectBF (days)BF (£)Jan 19Feb 19Mar 19Apr 19May 19Jun 19Jul 19Aug 19Sep 19Oct 19Nov 19Dec 19TotalAgeing (days)Comments
Project 10000200032002600780092Correct
Project 2
6116000-7000-40009000-6903-1126







5971151Incorrect: the ageing should be 212 (151 + 61) as the balance has not yet been reduced to 0
Project 3000000234652346531Correct
Project 40000800000800092Correct
Project 5
0007500-23005000-2850







7,350151Incorrect: the ageing should be 120
days as the balance has not yet been reduced to 0
Project 60000009185918531Correct
Project 7
91214253740-251653138-570







3081151Incorrect: the ageing should be 92
days as the balance was reduced to 0 in Feb 19.
Project 8318000000008000182Correct
Project 90000010000215003150061Correct
Project 103128388-28388041602422702838792Correct
Totals

<tbody>
</tbody>


Code:
=IF(R7=0,0,IF(SUMPRODUCT(--(SIGN(E7:P7)=-1),-E7:P7)>=D7,SUM(INDEX($E$5:$P$5,MIN(IF(COLUMN(E7:P7)-COLUMN(E7)+1>MAX(IF(E7:P7<0,COLUMN(E7:P7)-COLUMN(E7)+1)),IF(E7:P7>0,COLUMN(E7:P7)-COLUMN(E7)+1)))):$P$5),SUM($E$5:$P$5,C7)))

Let me know if you have a work around?!

Thanks again,
Ryan
 
Last edited:
Upvote 0
Sorry to bump this - but if anyone else could help, it would be much appreciated (it almost very nearly works as needed).

Thanks!
Ryan
 
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,769
Members
448,991
Latest member
Hanakoro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top