Calling a UDF from another UDF - ARRRGGGGHHHHH!!!

jswhip

Board Regular
Joined
Jan 19, 2005
Messages
69
I would like to create a library of functions. Some of the functions will call other custom functions (to save code replication). However, I can't seem to get the functions to work together. The code is contained within one module.

In the code below, the function "Prepay" works just fine. However, when I call the function "Ticks" I get "#Name?". But, when I use the function wizard f(x), the function is recognized (I can see the wizard is looking for CF, Speed, and Price) as inputs.

Public Function Ticks(CF As Single, CPR As Single, Price As Single) As Single

Ticks = CF * Prepay(CPR) * (Price / 100 - 1) / CF * 3200

End Function

Public Function Prepay(CPR As Single) As Single

CPR = CPR / 100
Prepay = (1 - (1 - CPR) ^ (1 / 12))

End Function
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Nevermind - upon researching, the problem lies in that the module was named the same as the function ("TICKS"). Changed the module name and all is well.
 
Upvote 0

Forum statistics

Threads
1,223,630
Messages
6,173,454
Members
452,514
Latest member
cjkelly15

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