Is it possible to add a comment within the cell of an excel formula? I have an exceedingly long expression inside a cell that could better understood if I can comment within it.
Excel 2010 is my version. Here is an example cell I'd like to notate:
=MID( A4, ((FIND("n ",A4,FIND(G4,A4))+75)+LEN(H4)+78), (FIND("n ",A4,(FIND("n ",A4,FIND(G4,A4))+75))) - ((FIND("n ",A4,FIND(G4,A4))+78)) )
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.
Using the N function to enter notesYou can use the N function to enter notes directly in a formula. Simply enter +N("whatever note you want") at the end of the formula. The text of the note must appear in double quotes ("") and returns a value of 0 so it does not affect the calculation.
You can also find this option in the Comments section on the REVIEW tab. To put the comment out of sight, right-click on the cell and select Hide Comment from the menu or click on the Show/Hide Comments option on the REVIEW tab.
Like this:
=SUM(A1:A4)+N("This is a comment")
http://www.howtogeek.com/162231/add-comments-to-formulas-and-cells-in-excel-2013/
For the problem Tom Sharpe mentions in the Answer by Ben Rhys-Lewis, there is a solution. Well, being Excel, probably five or six, but:
For text functions you wish to append a comment to, use something like this:
=CONCATENATE(IFERROR(A1/A2,""),T(N("comment")))
N() will return a "0" which T() will then make into an Excel blank. It acts like "" in a formula in that it adds nothing to or into a string though it will not be a null if you paste values with it... an Excel "blank" is born.
Note that it works with the math if the division does not result in an error because while Excel makes text out fo the result, in the cell, it uses it as a number for math done on that cell's text-number result (for instance, a text "3.5" will still add to a numerical 9.5 in another cell tha that adds 6 to the "3.5" in the cell).
Also, to make the comments stand out, you can break the piece of your formula with Alt-Enter right before and right after that piece and its comment. Not like real commenting, but standing out more than some horrid muddle that it just increased stands out, enough worth doing and you can almost always add spaces before the comment as well:
=function stuff function stuff CONCATENATE(IFERROR(A1/A2,""), T(N("comment"))) and a bit more function stuff and more and more and so on...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With