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
 
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  & ")"

I'm recording a step by step, not in VBA.
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I'm recording a step by step, not in VBA.
Recording a macro IS creating VBA (Macros and VBA really mean the same thing in Excel).

Note that you can only do real basic things with the Macro Recorder. It is very literal and NOT dynamic.
You can use it to create building blocks, and then edit the code that you created to make it more dynamic.

That is what you would have to do in this case. You cannot use Macro Recorder alone to dynamically apply the last row, like you want.
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,214
Members
449,074
Latest member
cancansova

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