
Tips.Net > ExcelTips Home > Formulas > Saving Common Formulas
Summary: If you’ve got a formula you like to use over and over again, you can assign the formula a name, just like you can with cell ranges. When you want to reuse the formula, just reference the name. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)
Sometimes, creating just the formula you want can be a victory all in itself. Once created, formulas become valuable, and you may need to use them over and over again in different worksheets you use. Wouldn't it be great to have a way to paste commonly used formulas in a workbook, the same way you can paste clip art or other common objects?
Unfortunately, such a capability is not resident within Excel. There are a couple of things you can do to make your formulas more accessible, however. One thing you can do is keep a text document (a Notepad document) on your desktop, and store your commonly used formulas in it. With Excel open, you can open the text document, copy the desired formula to the Clipboard, and quickly paste it in the desired cell of the workbook.
Another possible solution is to assign names to your formulas.
The procedure to name formulas is a bit different in Excel 2007. If you are using that version of the program, follow these steps, instead:
Now, whenever you want to use the formula, you simply enter an equal sign and the name you gave to the formula in step 7 (step 8 in the steps for Excel 2007). Even though the name shows in the cell, the formula assigned to the name is actually used in doing the calculation. Since the formula used relative references (you got rid of the dollar signs), it is always relative to where you use the name in the worksheet.
Another approach works great if you are comfortable with macros and with the VB editor. This approach involves making your common formulas part of your Personal.xls file. This workbook is opened whenever you start Excel, and is designed primarily for macros and customizations that you want available whenever you use Excel. But, there is no reason it cannot be used for common formulas, as well.
Assuming you haven't yet created a Personal.xls file, follow these steps if you are using a version of Excel prior to Excel 2007:
You can record the same macro by following these steps in Excel 2007:
The macro you recorded is now stored in your newly created Personal.xls worksheet. To see the code that you created, open the VB Editor (Alt+F11). In the upper-left corner of the editor is the Project Explorer; it lists all the various pieces and parts accessible through the editor. One of the items in the Project Explorer should be PERSONAL.XLS. If you expand this object (click the small plus sign to the left of the project name), you should see a Modules folder. Expand the Modules folder, and it contains Module1. If you double-click on this module you see the macro you just recorded; it looks something like this:
Sub Macro1()
' Macro1 Macro
'
'
Range("A4").Select
End Sub
You can now select this code and delete it, since you don't need it any more. You can then place other macros or user-defined function in the module, so they will be available.
What about formulas? Copy them to the Clipboard and paste them in the module, outside of any procedures defined therein. All you need to do is make sure you preface the formula with an apostrophe, so that the VB Editor thinks you are entering a comment. When you need the formulas at a later time, just go to the VB Editor, open the module, copy the formula, and paste it into the workbook you need.
Tip #2957 applies to Microsoft Excel versions: 97 2000 2002 2003 2007
Save Time! You can have this tip (and several hundred just like it) in the ExcelTips annual archives. Imagine having over 400 tips available at your fingertips, in each annual volume.
You can put times into a worksheet, but then what? Need to do calculations with times? How about working with elapsed time? Don't be confused; learn how easy it can be. (more information...)
Ask an Excel Question
Make a Comment
ExcelTips FAQ
ExcelTips Premium
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Pet Tips
Word2007 Tips
WordTips
Advertise on the
ExcelTips Site