A
Angela
Hi,
I am working on an again formula in excel.
I have managed it in as a formula but now I need it to be a UDF.
Below is what I've been trying to do.
Code:
Function AgeBucket(strValue As Date, Rng As Range, 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(Application.WorksheetFunction.Today()
- strValue, Rng, Rng2)
End Function
Any input is more than welcome.
Thanks
I am working on an again formula in excel.
I have managed it in as a formula but now I need it to be a UDF.
Below is what I've been trying to do.
Code:
Function AgeBucket(strValue As Date, Rng As Range, 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(Application.WorksheetFunction.Today()
- strValue, Rng, Rng2)
End Function
Any input is more than welcome.
Thanks