Reputation:
Custom Functions are always slower than Built-in functions!
What is the secret?
and is there any way to access the code that is written for Built-in functions to see how they differ from custom ones???
Upvotes: 0
Views: 246
Reputation: 27516
Custom functions written in VBA will always be slower than built-in functions, yes. That's because the built-in functions are written in (presumably) C, which is compiled into optimized machine code, whereas VBA functions are interpreted. (Strictly speaking, they're "compiled" into an intermediate language prior to execution, but still - it's not machine code).
Upvotes: 2