How to Access a Function in Workbook 2 Written in Workbook 1

Can you access a function in workbook 2 if it was written in workbook 1?

Is it possible to access a function created in one workbook from another workbook?

Answer:

Accessing a function from one workbook in another is possible; in Excel, it typically involves setting a reference to the original workbook or storing the function in a shared location like PERSONAL.XLSB.

When you have written a function in Workbook 1 and want to use it in Workbook 2, you have several options for making it accessible. In Microsoft Excel, if you have created a User Defined Function (UDF) using VBA, you can access it from another workbook by setting a reference to Workbook 1 or by saving the function in a shared location like PERSONAL.XLSB.

Setting a reference to Workbook 1 allows Workbook 2 to recognize and utilize the function you created. Storing the function in a shared location like PERSONAL.XLSB makes it available across multiple workbooks without the need to set individual references each time.

It's important to note that functions that are part of the application's built-in functionality can be accessed from any workbook without the need for additional steps. However, for custom functions or UDFs, you may need to take the extra step of setting references or storing them in a shared location to access them from different workbooks.

← Labels in worksheet a reflective analysis How to improve your business sales performance →