From https://www.benlcollins.com/spreadsheets/google-sheets-formulas-techniques/
Add comments to your formulas, using the N function.
N returns the argument provided as a number. If the argument is text, inside quotation marks, the N function returns 0.
So we can use it to add a comment like this:
=SUM(A1:A100) + N("Sums the first 100 rows of column A")
which is effectively the same as:
=SUM(A1:A100) + 0
which is just:
=SUM(A1:A100)
And from How to add a note or comment into a formula in Google Sheets?
For formulas that generate text, you can add T()
around the N()
function:
="…" & T(N("your comment here"))