Add Comments to a Formula


May 11, 2022 - by Bill Jelen

Add Comments to a Formula

Problem: I spent a great deal of time perfecting the formula shown below. I would like to leave myself notes about it so I can figure it out again six months from now.

A formula shown previously, using RANK+COUNTIF.
Figure 465. Will you remember why you added the COUNTIF?

Strategy: An old Lotus 1-2-3 function—the N function—is still available in Excel. It turns out that N of a number is the number and N of any text is zero. Thus, you can add several N functions to a formula without changing the result, provided that they contain text.


If you have figured out some obscure formula, you can leave yourself notes about it right in the formula.

The formula from the previous figure with three comments. The comments use =N("this is a comment") style comments. The N of text is zero, so adding zero does not change the answer in the cell.
Figure 466. Add your comment as text in the N() function.

This article is an excerpt from Power Excel With MrExcel

Title photo by Kelly Sikkema on Unsplash



Bill Jelen is the author / co-author of:
Guerrilla Data Analysis Using Microsoft Excel - 3rd Edition

Two of the leading Excel channels on YouTube join forces to combat bad data. This book includes step-by-step examples and case studies that teach users the many power tricks for analyzing data in Excel. These are tips honed by Bill Jelen, "MrExcel," and Oz do Soleil during their careers run as financial analysts.