REGISTER.ID Function

Excel Functions › User defined

All versions (add-in) User defined

The Excel REGISTER.ID function returns the register ID of a specified DLL or code resource that has been — or will be — registered for use with CALL. Like CALL, it is an advanced macro-era function that touches external code and is restricted in most modern, security-hardened Excel installations.


Quick answer:
=REGISTER.ID("MyLib.dll","DoWork") returns the register ID for the DoWork procedure

Syntax

=REGISTER.ID(module_text, procedure, [type_text])
ArgumentDescription
module_textRequiredThe name of the DLL or code resource that contains the procedure (for example "MyLib.dll" or a system library name).
procedureRequiredThe name — or ordinal number — of the procedure within that DLL.
type_textOptionalA text string describing the data types of the return value and the arguments the procedure expects. Needed when the procedure has not already been registered.

How to use it

REGISTER.ID is the companion to CALL. Where CALL actually runs an external procedure, REGISTER.ID just hands back the register ID — the numeric handle Excel uses to identify a DLL procedure that has been registered (or that you are registering now). You then feed that ID to CALL.

=REGISTER.ID("MyLib.dll","DoWork") // returns the register ID
=CALL(register_id, 42) // uses that ID to run DoWork(42)

If the procedure was already registered (often by REGISTER), you can call REGISTER.ID with just the module and procedure names to retrieve its existing ID without re-registering.

Same security caveats as CALL. REGISTER.ID is part of the external-code family, so it lives in XLLs and macro sheets rather than ordinary worksheet cells, and Trust Center / IT policy often disables it. Do not expect it to work as a casual worksheet formula.

For new work, register custom functions through VBA, a JavaScript Office Add-in, or an XLL built on Excel's C API rather than the REGISTER / REGISTER.ID / CALL trio.

Try it: interactive demo

Live demo

Pick a REGISTER.ID example to see the formula and its result.

Result:

Practice workbook

📊
Download the free REGISTER.ID practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

Is REGISTER.ID safe and usable in a normal worksheet?
Generally not as an everyday worksheet formula. It is part of the same external-code mechanism as CALL, so modern Excel confines it to XLLs and macro sheets, and security policy frequently blocks it. Treat it as a legacy / developer feature.
Why does REGISTER.ID return an error?
Typical causes are security restrictions, a DLL or procedure name that does not exist or is the wrong bitness (32- vs 64-bit), a missing or incorrect type_text for a procedure that has not been registered yet, or use outside the XLL / macro-sheet context where it is allowed.
Do I need an add-in to use REGISTER.ID?
You need the external DLL or code resource you are registering, and an environment that permits external code (Trust Center settings, normally an XLL or macro-sheet context). There is no simple checkbox add-in that turns it into a regular worksheet function.
What is the modern alternative to REGISTER.ID and CALL?
Register custom functionality with VBA, a JavaScript Office Add-in, or an XLL written against Excel's C API. The REGISTER / REGISTER.ID / CALL family is a macro-sheet-era mechanism kept mainly for backward compatibility.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: CALL · EUROCONVERT · INDIRECT · HYPERLINK · LAMBDA