Ageing

ryan7

Board Regular
Joined
Apr 30, 2020
Messages
84
Office Version
  1. 2016
Platform
  1. Windows
I could not find an ageing thread that answered this clearly.
I have the below dates and corresponding values listed under Amount.
I've marked the ageing bucket and what should be the correct value but I'd like to know the correct formula to save time for each.
Thanks


DateAmountAgeingTotals
05/02/2021​
£ 49.96Current£ 1,633.91
06/04/2021​
£ 9.831-30 days£ 128.98
18/05/2021​
£ 2.2331-60 days-£ 30.30
18/05/2021​
£ 16.0661-90 days
0​
06/09/2021​
£ 137.1591-120 days£ 229.30
21/09/2021​
£ 92.15121+ Days£ 78.08
11/11/2021​
-£ 30.30Total£ 2,039.97
20/12/2021​
£ 66.96
24/12/2021​
£ 45.00
24/12/2021​
£ 1.90
31/12/2021​
£ 15.12
05/01/2022​
-£ 8.24
07/01/2022​
£ 188.69
10/01/2022​
£ 1,235.60
10/01/2022​
£ 31.21
10/01/2022​
£ 186.65
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
i'm not getting the same results , using SUM() for current
also I'm using a SUMIF() and a SUMIFS()
for the dates

is this 30days from today() or 30days from the latest date in list

so you can see how i have structured the formulas - so a SUMIFS() for the other ranges

Book6
ABCDEFG
1DateAmountAgeingTotalsTODAYMAX date
22/5/21$49.96Current$1,633.91$2,039.97$2,039.97
34/6/21$9.831-30 days$128.98$195.57$309.43
45/18/21$2.2331-60 days($30.30)$113.86$0.00
55/18/21$16.0661-90 days0
69/6/21$137.1591-120 days$229.30
79/21/21$92.15121+ Days$78.08
811/11/21($30.30)Total$2,039.97
912/20/21$66.96
1012/24/21$45.00
1112/24/21$1.90
1212/31/21$15.12
131/5/22($8.24)
141/7/22$188.69
151/10/21$1,235.60
161/10/21$31.21
171/10/21$186.65
Sheet1
Cell Formulas
RangeFormula
F2F2=SUM(B2:B17)
G2G2=SUM(B2:B17)
F3F3=SUMIF(A2:A17,">="&TODAY()-30,B2:B17)
G3G3=SUMIF(A2:A17,">="&MAX(A2:A17)-30,B2:B17)
F4:G4F4=SUMIFS(B2:B17,A2:A17,">="&TODAY()-60, A2:A17,"<"&TODAY()-30)
 
Upvote 0
i'm not getting the same results , using SUM() for current
also I'm using a SUMIF() and a SUMIFS()
for the dates

is this 30days from today() or 30days from the latest date in list

so you can see how i have structured the formulas - so a SUMIFS() for the other ranges

Book6
ABCDEFG
1DateAmountAgeingTotalsTODAYMAX date
22/5/21$49.96Current$1,633.91$2,039.97$2,039.97
34/6/21$9.831-30 days$128.98$195.57$309.43
45/18/21$2.2331-60 days($30.30)$113.86$0.00
55/18/21$16.0661-90 days0
69/6/21$137.1591-120 days$229.30
79/21/21$92.15121+ Days$78.08
811/11/21($30.30)Total$2,039.97
912/20/21$66.96
1012/24/21$45.00
1112/24/21$1.90
1212/31/21$15.12
131/5/22($8.24)
141/7/22$188.69
151/10/21$1,235.60
161/10/21$31.21
171/10/21$186.65
Sheet1
Cell Formulas
RangeFormula
F2F2=SUM(B2:B17)
G2G2=SUM(B2:B17)
F3F3=SUMIF(A2:A17,">="&TODAY()-30,B2:B17)
G3G3=SUMIF(A2:A17,">="&MAX(A2:A17)-30,B2:B17)
F4:G4F4=SUMIFS(B2:B17,A2:A17,">="&TODAY()-60, A2:A17,"<"&TODAY()-30)
Current will refer to January dates only.
1-30 Days, December only
31-60 Days, November
etc..
 
Upvote 0
so if you open the spreadsheet on the 1st Feb, then
Current = Feb,
1-30 = Jan
31-60 = Dec previous year

they are only 30 days - but months have 28,30,31 days in
 
Upvote 0
Hi,

This works Based on Months, Not days:

Book3.xlsx
ABCDE
1DateAmountAgeingTotals
22/5/2021$49.96Current1,633.91
34/6/2021$9.831 Month128.98
45/18/2021$2.232 Months-30.30
55/18/2021$16.063 Months0.00
69/6/2021$137.154 Months229.30
79/21/2021$92.154 Months+78.08
811/11/2021-$30.30Total2,039.97
912/20/2021$66.96
1012/24/2021$45.00
1112/24/2021$1.90
1212/31/2021$15.12
131/5/2022-$8.24
141/7/2022$188.69
151/10/2021$1,235.60
161/10/2021$31.21
171/10/2021$186.65
Sheet956
Cell Formulas
RangeFormula
E2:E6E2=SUMPRODUCT((MONTH(A$2:A$17)=MONTH(EDATE(TODAY(),-ROWS(E$2:E2)+1)))*B$2:B$17)
E7E7=E8-SUM(E2:E6)
E8E8=SUM(B2:B17)
 
Upvote 0
Hi,

This works Based on Months, Not days:

Book3.xlsx
ABCDE
1DateAmountAgeingTotals
22/5/2021$49.96Current1,633.91
34/6/2021$9.831 Month128.98
45/18/2021$2.232 Months-30.30
55/18/2021$16.063 Months0.00
69/6/2021$137.154 Months229.30
79/21/2021$92.154 Months+78.08
811/11/2021-$30.30Total2,039.97
912/20/2021$66.96
1012/24/2021$45.00
1112/24/2021$1.90
1212/31/2021$15.12
131/5/2022-$8.24
141/7/2022$188.69
151/10/2021$1,235.60
161/10/2021$31.21
171/10/2021$186.65
Sheet956
Cell Formulas
RangeFormula
E2:E6E2=SUMPRODUCT((MONTH(A$2:A$17)=MONTH(EDATE(TODAY(),-ROWS(E$2:E2)+1)))*B$2:B$17)
E7E7=E8-SUM(E2:E6)
E8E8=SUM(B2:B17)
I want to build this into a macro. How do I correctly capture the correct number of rows when they will be different each time. In it's current form it returns 0's when a different number of rows .
 
Upvote 0
You can find the last row number of any column like this (example for column A)
VBA Code:
Dim lastRow as Long
lastRow = Cells(Rows.Count, "A").End(xlUp).Row
 
Upvote 0
You can find the last row number of any column like this (example for column A)
VBA Code:
Dim lastRow as Long
lastRow = Cells(Rows.Count, "A").End(xlUp).Row
So, in the below example, how would the highlighted parts read in a formula that finds the last row each time? Thank You

=SUMPRODUCT((MONTH(A$2:A$17)=MONTH(EDATE(TODAY(),-ROWS(E$2:E2)+1)))*B$2:B$17)
 
Upvote 0
I though you said that you wanted to do it with a Macro?

In VBA, to apply that formula somewhere, you could do it like this:
Rich (BB code):
Range(...).Formula = "=SUMPRODUCT((MONTH(A$2:A$" &  lastRow & ")=MONTH(EDATE(TODAY(),-ROWS(E$2:E2)+1)))*B$2:B$" & lastRow  & ")"
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,680
Members
449,116
Latest member
HypnoFant

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