+ Reply to Thread
Results 1 to 21 of 21

Adding comments to formulas

  1. #1
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Adding comments to formulas

    Everyone knows about adding a comment to a cell but did you know that you can add a comment directly to a formula?

    This could come in handy to give users a reminder of some critical piece of information related to the formula.

    For example, to remind users that the formula needs to be array entered:

    Data Range
    A
    B
    C
    D
    E
    F
    1
    Name
    Y/N
    Bid
    -----
    Max Yes
    Name
    2
    Sue
    Yes
    45
    77
    Biff
    3
    Carl
    Yes
    30
    4
    Tom
    No
    59
    5
    Erin
    No
    61
    6
    Abbey
    No
    28
    7
    Biff
    Yes
    77
    8
    Lisa
    No
    33
    9
    Paul
    Yes
    17
    10
    Ken
    No
    77


    This array formula** entered in E2:

    =MAX(IF(B2:B10="Yes",C2:C10))+N("Array Entered - CSE")

    This array formula** entered in F2:

    =INDEX(A2:A10,MATCH(E2,IF(B2:B10="Yes",C2:C10),0))&T(N("Array Entered - CSE"))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Adding comments to formulas

    Hi Tony Valko,

    Nice Tip

    But I was read in J-Walk book about the same topic and in which he achieved it using simple expressions but I am unable to recollect those from my memories.

    I think it is an 2003 pdf book which I lost due to hard disk failure. Not able to recollect the book name too since I had huge collection of excel books...

    I remember in that book he described about payroll model and used several formula's with comments inside it. Like "Tax" and the tax formula. But the word tax only show in formula bar to understand the calculation is related to Tax. Like that he used lot more which stands only in formula bar for understanding the formula alone.

    I was searching that method in google but unable to get it

    Do you have any idea other than this method?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Adding comments to formulas

    Hello Sixthsense

    Take a look to this.

    http://www.excelforum.com/excel-tips...l-formula.html
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Adding comments to formulas

    Hi Fotis1991,

    Thanks for the link

    But still I think J-Walk done it without using N() function, I believe.

    But unable to recollect that method/expressions from my memory

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Adding comments to formulas

    Quote Originally Posted by Tony Valko View Post
    Everyone knows about adding a comment to a cell but did you know that you can add a comment directly to a formula?
    Just be aware that in some complex formulae, this will throw up an error message. I have not successfully used it in formulae using the INDIRECT function, for example.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Adding comments to formulas

    Hello Sixsense,
    Are you mentioning about defined name?
    Quang PT

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Adding comments to formulas

    Quote Originally Posted by bebo021999 View Post
    Are you mentioning about defined name?
    No... It's about addding comments inside the formula for easy understanding

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Adding comments to formulas

    Quote Originally Posted by :) Sixthsense :) View Post
    No... It's about addding comments inside the formula for easy understanding
    Yep. With defined name, "Tax" (to be a comment) will be showed in formula bar while result in cell.

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Adding comments to formulas

    @ Quang,

    What you are saying is right... but we know the difference between named range and the comment.

    I still remember J-walk used some expressions to show comments inside the formula.

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Adding comments to formulas

    Quote Originally Posted by AliGW View Post
    Just be aware that in some complex formulae, this will throw up an error message. I have not successfully used it in formulae using the INDIRECT function, for example.
    Show me the formula you're trying to use it in.

    If it's constructed correctly it should work with no errors.
    Last edited by Tony Valko; 03-03-2014 at 10:29 AM.

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Adding comments to formulas

    Not aware of other formula methods.

    A couple of weeks ago a poster was concerned about users not array entering a formula so I suggested adding the comment to the formula.

    That's what prompted me to start this thread.

    EDIT: Here's that thread:

    http://www.excelforum.com/excel-form...-combined.html

    Post #9
    Last edited by Tony Valko; 03-03-2014 at 11:08 AM.

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Adding comments to formulas

    Quote Originally Posted by :) Sixthsense :) View Post

    I was searching that method in google but unable to get it

    Do you have any idea other than this method?
    I just did a quick look at JWalk's site and didn't find anything.

    Maybe you could contact him through his site and ask about this.

  13. #13
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Adding comments to formulas

    how about

    =formula+IF(TRUE,0,"Notes") -> we'll basically same with returning 0 in N... I hope .
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Adding comments to formulas

    Yeah, that'll work!

  15. #15
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Adding comments to formulas

    Important notice for user:

    To give comment to a blank cell like this:

    =N("Do not input here")

    may cause blank to non blank cell and return bad results somewhere.

  16. #16
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Adding comments to formulas

    @Tony,
    I dont know how to say thank for the tip, just here, in #4

  17. #17
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Adding comments to formulas

    __________

  18. #18
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Adding comments to formulas

    Quote Originally Posted by Tony Valko View Post
    Maybe you could contact him through his site and ask about this.
    Thanks for the suggestion, and yes I sent a mail to him and I will update here once I receive the reply

  19. #19
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Adding comments to formulas

    My Query

    Is there any method to add comment to formula without using N() function. I remember, you shown it in one of your excel books but unable to recollect it.
    Reply from J-Walk

    There’s no other method that I know about. (But you can use Excel’s normal cell comment feature, of course)

    -John
    Everyone please accept my apologies for mis-interpreting something on assumption

  20. #20
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Adding comments to formulas

    No problem.

    Thanks for letting us know!

  21. #21
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Adding comments to formulas

    ISNUMBER() does the deed, too.
    Last edited by icestationzbra; 03-10-2014 at 05:15 PM. Reason: too verbose...
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Adding $ to many formulas
    By NRZ in forum Excel General
    Replies: 2
    Last Post: 08-17-2010, 06:38 PM
  2. Cell coments into Word
    By screetch in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2007, 04:01 AM
  3. [SOLVED] How do I ensure that the coments appear adjacent to the cell
    By A.RAGHUNATH in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-07-2006, 08:40 AM
  4. Can I change Indacator coments color?
    By Monica in forum Excel General
    Replies: 2
    Last Post: 02-16-2006, 05:10 PM
  5. Coments
    By Horacio in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-22-2005, 09:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1