Establishing a Naming Convention

Written by Allen Wyatt (last updated December 29, 2025)

2

Nate is designing a large workbook that has dozens of worksheets. He needs to create many names in the workbook for things like ranges, tables, formulas, and constants. Nate knows he won't be the only one to maintain this workbook down the road, so he's trying to develop an understandable naming convention for the names. This makes him wonder what the best practice is in this area.

The problem with a phrase such as "best practice" is that it makes people think there is a single, best approach when that may not be the case. It certainly is not the case when it comes to determining a naming convention like Nate desires. In fact, there are several different approaches you can take to naming, as will become apparent.

Every naming convention involves the use of a prefix of some sort that indicates the type of element to which the name applies. For instance, you might prefix formulas with the letter "f" or the letters "fo" and tables with "t" or "tbl." It doesn't matter if you use one, two, or three characters; there are pros and cons to each approach. The idea is that your prefix should be understandable and unambiguous.

Your prefix is typically followed by a word or two that details the purpose of the item. This is where some folks have formalized notation. Since Excel names cannot contain spaces, notation typically differs in how capital letters and underscores are used. Here is an example of what is often referred to as Hungarian Notation in names:

rngStartDates

Note that the prefix is all lowercase and the purpose words each start with a capital letter. The purpose words should be clear, meaningful, and concise. Sometimes you may find it more understandable to separate the prefix from the purpose words with an underscore:

rng_StartDates

The use of underscores in this manner is sometimes referred to as Snake Case, though technically Snake Case doesn't do prefixes or any capitalization:

start_dates

You can discover more about the formal names, such as Hungarian Notation and Snake Case, at this site:

https://www.encyclopedia-excel.com/vba-naming-conventions-how-to-write-good-variable-names-vba-tutorial

Note that this site is about naming variables in VBA, but the concepts are just as applicable to naming objects and elements in an Excel workbook. Personally, I find that underscores between the prefix and the purpose words are advantageous if your prefix is only a single character or two. For instance, if you are using a single letter for tables, such as "t" or "T," then I find the second and third names here clearer than the first:

tSeasonAdjustments
t_SeasonAdjustments
T_SeasonAdjustments

The underscore may be overkill, however, if you use three lowercase characters for the prefix:

tblSeasonAdjustments

This boils down to personal preference and what you find easiest to implement and understand. With or without an underscore, you could use the following as prefixes:

  • rng (range)
  • tbl (table)
  • col (column)
  • row (row)
  • fn (function)
  • frm (formula)
  • cnst (constant)
  • lst (list)
  • cht (chart)

Besides a prefix and purpose words, you may also want to include an indication of where the object or item is located. For instance, if a constant that defines the target margin is located on a worksheet named Details, then you might name the constant in this manner:

cnst_TargetMargin_Details

The structure and purpose of each name is, again, entirely up to you and what makes sense. It can be especially important to include a worksheet name in a name if the worksheet is normally hidden.

When you define names, there are several places that this can be done, depending on what is being named. The Name Manager is the key place if you are naming ranges, constants, and formulas. However, tables are named using the Table Name box on the Table Design tab of the ribbon, charts are named using the Name Box, and other objects may be named in other places.

I should also mention that if there really is a "best practice" in naming conventions, that practice would be consistency. Once you settle on an approach to naming things, you need to consistently apply that approach. If you fail to do so, then you really don't have a convention, and your names will be a mess.

Finally, once you decide on a naming convention, you'll want to document it somewhere. If you are developing a naming convention that will be used in a single workbook, then you should consider documenting it in a worksheet within that workbook. (You can even hide the worksheet if you think it might otherwise detract from the use of the workbook.) If you are developing a convention that you will use in multiple workbooks, then create a separate document that shows your convention and explains why you made the decisions that you did. Any documentation you put together will be invaluable for people who may need to maintain your workbooks in the future.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10055) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Parsing Non-Standard Date Formats

When you load data into Excel that was created in other programs, the formatting used for some types of data (such as ...

Discover More

Excel Custom Formats (Special Offer)

Excel Custom Formats gets you to the heart of Excel's formatting power. This special offer provides another way to ...

Discover More

Converting UTC Times to Local Times

Dates and times are often standardized on UTC time, which is analogous to GMT times. How to convert such times to your ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Pasting Multiple Worksheets into a Word Document

Two very common programs that are used together are Excel and Word. If you want to copy multiple worksheets from an Excel ...

Discover More

Changing Your Name

One of the many pieces of information that Excel keeps track of is your name. If you want to change your name for Excel's ...

Discover More

Slowing Down Mouse Selection

Ever tried to select a range of cells using the mouse, only to have the cells scroll by so quickly you can't make the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 5 + 4?

2025-12-27 15:57:45

jamies

Do NOT use upper and lowercase letters to denote different things,
You may find that VBA script processing notes the(first) use of a text string in a script with the capitalisations in it,
and changes what you type in to match that remembered capitalisation.

Also certainly for Excel be careful not to use special characters that Excel considers to have meanings to it, or are prohibited in some uses of names such as @ and ! and similarly those having special meanings - within REGEX too.

With a final warning about the selected codepage (annoying things such as the ' character's conversion according to that and the language of the "office App" install, and the OS install.


2025-12-27 10:35:43

Don Small

Thank you, Allen. A very useful article.

@Allen, not that the third paragraph from the end is incomplete!


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.