Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF for Aging in excel - Help needed
Hi, I am working on an aging formula in excel. I have date in any cell and if I want to test age, I just use below excel formula to see the age bracket. I have managed it in as an array formula in excel but now I need it to be a UDF. =LOOKUP(TODAY()-Y2, {0,7.51,14.51,21.51,30.51,45.51,60.51;"0-7","8-14","15-21","22-30","31-45","46-60","60"}) Below is what I've been trying to do. Code: Function AgeBucket(strValue) As String Dim strValue As Date Dim Rng As Range Dim Rng2 As Range Rng = Array(0, 7.51, 14.51, 21.51, 30.51, 45.51, 60.51) Rng2 = Array("0-7", "8-14", "15-21", "22-30", "31-45", "46-60", "60") AgeBucket = Application.WorksheetFunction.Lookup(Today - strValue, Rng; Rng2) End Function Any input is more than welcome. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UDF for Aging in excel - Help needed | Excel Programming | |||
aging category calculation for open purchase order report in Excel | Excel Worksheet Functions | |||
Excel for inventory aging? | Excel Worksheet Functions | |||
How can I pull and format an SAP aging report into Excel? | Excel Programming | |||
How to make aging possible in Excel for an age trial balance shee. | Excel Discussion (Misc queries) |