How to save custom functions and macros to an Add-In
Macros and custom functions are great, they can automate many tedious tasks. To have them available whenever you need them, save user defined functions and macros to a personal add-in.
When you open a new excel spreadsheet, these functions and macros are ready to be used.
How to quickly create an empty Add-in for Excel 2007 and later versions
- Save a blank workbook as a Excel Add-In (*.xlam) in your Add-In folder.
I named it MyAddIn.xlam. - Press with left mouse button on Office button.
- Press with left mouse button on "Excel options" button.
- Press with left mouse button on "Add-Ins" tab.
- Select Excel Add-ins.
- Press with left mouse button on "Go..." button.
- Press with left mouse button on "Browse.." button.
- Select MyAddIn.xlam.
- Press with left mouse button on OK.
- Make sure MyAddIn is enabled in Add-In Manager.
- Press with left mouse button on OK.
Recommended article
Recommended articles
Save links to your favorite macros in a personal tab on the ribbon for easy access and become more productive. […]
Add custom functions to your personal add-in
- Press with left mouse button on "Developer" tab on the ribbon.
- Double press with left mouse button on Myfunctions.xlam in project window.
- Press with left mouse button on "Insert" tab.
- Press with left mouse button on Module.
- Copy and paste custom functions and macros to code window.
Take a look at Category: UDFs
How to use custom functions in an Add-In
- Select a cell.
- Type the custom function name in formula bar. Press Enter.
If you don´t know the name of your custom function, continue to step 3. - Press with left mouse button on "Insert Function" button.
- Select category "User Defined".
- Select your custom function.
- Press with left mouse button on OK.
How to use macros in an Add-In
- Press with left mouse button on "Developer" tab.
- Press with left mouse button on Macros button.
- Type the name of your macro.
- Press with left mouse button on "Run" button
Example custom functions and macros
Which macro shortcut keys do you use? (Code for excel and outlook)
Personal.xls (Daily dose of excel)
User defined functions (Get Digital Help)
Recommended blog posts:
Excel Macro Toolbar
Menu for favorite macros in Excel 2007-2010 (for all workbooks)
Making Your Custom Functions Available Anywhere
Add in category
In this post I am going to show how to create a new sheet for each airplane using vba. The […]
Merge Ranges is an add-in for Excel that lets you easily merge multiple ranges into one master sheet. The Master […]
This article demonstrates an array formula that searches two tables on two different sheets and returns multiple results. Sheet1 contains […]
Macro category
This article demonstrates a macro that copies values between sheets. I am using the invoice template workbook. This macro copies […]
This tutorial shows you how to list excel files in a specific folder and create adjacent checkboxes, using VBA. The […]
In this post I am going to show how to create a new sheet for each airplane using vba. The […]
This blog post demonstrates how to create, populate and change comboboxes (form control) programmatically. Form controls are not as flexible […]
The image above shows an array formula in cell D6 that extracts missing numbers i cell range B3:B7, the lower […]
This article demonstrates how to run a VBA macro using a Drop Down list. The Drop Down list contains two […]
This workbook contains two worksheets, one worksheet shows a calendar and the other worksheet is used to store events. The […]
In this article I will demonstrate how to quickly change chart data range utilizing a combobox (drop-down list). The above […]
What's on this page Copy a file Copy and rename a file Rename a file List files in a folder […]
Excel does not resize columns as you type by default as the image above demonstrates. You can easily resize all […]
This article describes how to create an interactive chart, the user may press with left mouse button on a button […]
Rahul asks: I want to know how to create a vlookup sheet, and when we enter a name in a […]
This article describes how to create a button and place it on an Excel worksheet then assign a macro to […]
Question: hi all, thanks for the great formula/array formula. it works great. lately, i noticed that the array formula will […]
This article demonstrates a macro that inserts new worksheets based on names in a cell range. The cell range may […]
In this article, I am going to demonstrate a simple workbook where you can create or delete projects and add […]
Today I would like to share with you these small event handler procedures that make it easier for you to […]
This article explains how to hide a specific image in Excel using a shape as a button. If the user […]
This article describes different ways to locate literal or hardcoded values in formulas. The image above shows the result from […]
This article demonstrates macros that save worksheets to a single pdf file. What's on this webpage Export all worksheets in […]
User defined function category
This user defined function creates a unique distinct list of words and how many times they occur in the selected […]
This article demonstrates two formulas that extract distinct values from a filtered Excel Table, one formula for Excel 365 subscribers […]
This article demonstrates a user defined function that lists files in a ggiven folder and subfolders. A user defined function is […]
The image above demonstrates a user-defined function in cell range B6:D7 that allows you to search a folder and subfolders […]
Question: How do I divide values equally into groups (3 lists or less)? This post shows you two different approaches, […]
This blog post describes how to create permutations, repetition is NOT allowed. Permutations are items arranged in a given order meaning […]
This article demonstrates how to convert a range of cells containing strings separated by a delimiter into a range of […]
This blog post describes how to create a list of unique distinct words from a cell range. Unique distinct words […]
This article demonstrates a User Defined Function (UDF) that counts unique distinct cell values based on a given cell color. […]
The SUBSTITUTE and REPLACE functions can only handle one string, the following User-Defined Function (UDF) allows you to substitute multiple […]
This article demonstrates formulas that count values in cell based on a delimiting character. The image above shows a formula […]
AJ Serrano asks: I have a column where each rows contains different values and I wanted to obtain the duplicate […]
This article explains how to perform multiple lookups based on values in one cell with a delimiting character using a […]
This article describes a User Defined Function that lookups values in multiple cross reference tables based on two conditions. A […]
Question:I would like to reduce the number of open items by identifying positive and negative amounts that net to zero […]
This article demonstrates formulas and a UDF that searches for values in a table based on concatenated values and returns […]
This blog post demonstrates a custom function (UDF) that creates permutations. Repetition is allowed. The custom function lets you specify the […]
In this vba tutorial I am going to show you how to return values from an udf, depending on where […]
This article describes how to find a sum from a range of numbers using a user defined function. Let´s see […]
Excel categories
4 Responses to “How to save custom functions and macros to an Add-In”
Leave a Reply
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
spellnumber command
Having lost my macros a number of times using Excel 2010, I have discovered that Personal.xlam is NOT saved on exit even if changes have been made! You must remember to save it manually or lose all your hard work. Does anyone know how to FORCE a save if the file is "dirty"?
[…] can find instructions to do this in many places. A quick search revealed this site which also includes pictures; at step 5 in their “Add custom functions to your personal add-in” […]
I've made very bad experience with your approach and thus ended up with a Workbook with all the macros (I call them services) which includes a test environment for a regression test etc. Whenever I've changed something in this Workbook I 'Setup/Renee' the Addin. This is not just saving it as Addin but is a much more complex process. It has to be considered that the Addin is open and referenced by other open Workbooks. And last but not least these two instances - which only differ by their extension (xlsb versus xlam) have to be considered when the Workbook is opened.