How To Add Comments To A Formula In Excel

Have you ever come across an Excel file with a bunch of formulas you can’t make any sense of? I do all the time. Not only do I come across these files often, I’m also the one that makes them! Lots of them.

For anyone who has ever programmed before, the ability to add comments is vital. There is no easy way to comment a formula and Excel doesn’t have a way to do this.

Let’s look at a number of ways we can bring clarity to the formulas we use in Excel.

1. One of the most obvious ways to comment anything in excel (including formulas) is to just add a comment. You can do this from the review tab, or by pressing SHIFT+F2. Once the comment window pops up, you can write a novel about the formula.

2. You can get away with no comments at all if your formulas are easier to read.
It helps if you break your formula line by line, which you can do by pressing  ALT+Enter on Windows or Control + Option + Enter if you are on a Mac.

3. If the end result of your formula is a numeric value, you can use a nifty hack with the N function. The N function converts any non-numeric value to a number so we can use this formula to embed a comment. Whatever the comment is, it will turn into a zero value, thus not affecting any calcs. To add a comment, just add +N(“You comment goes here”) to your formula wherever you please.

However, if your formula returns a string, this won’t work and the end result will be an error with #VALUE!.4. It also helps to have the full formula visible in a cell. We can get it done by adding ‘ to the formula. I usually have two columns running side by side, the first with a formula that calculates the values, and the second with the ‘ character, so the entire formula is shown as text.

I hope this helps, happy excelling!

Dmitry Shesterin

Dmitry has done everything. From sales and marketing in mobile telecommunications and printing (in Russia and Germany) to sales engineer and marketing lead (at Faronics). Dmitry has an unrivaled love of Excel and his sense of humor resembles Ambrose Bierce, his favorite writer.