+ Reply to Thread
Results 1 to 4 of 4

Add Comment Automatically when value is "-"

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    4

    Post Add Comment Automatically when value is "-"

    Dear Friends,

    I am new in this forum. I just want to put automatic comment when cell value is "-". The sheet is attached.

    Thanks..
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Add Comment Automatically when value is "-"

    I would use a macro, something like this (change the word "comment" in the bracket to the text your want to add):

    Please Login or Register  to view this content.
    Last edited by NickyC; 08-09-2012 at 06:16 AM.

  3. #3
    Registered User
    Join Date
    08-09-2012
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Add Comment Automatically when value is "-"

    Thanks for the swift reply... what about when I update the cell value... the comment was still there once I update... and guide me each time I have to run the macro?

    Regards.

  4. #4
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Add Comment Automatically when value is "-"

    hi
    you could set up the macro to delete comments as well as add them if you like. One way to do this would be to set up a macro that runs whenever you change the worksheet, but these can slow your machine up if you have lots of data and calculations.

    To do this, right click on the tab with the sheet name at the bottom of the sheet, select "view code" and paste this macro into the sheet's VBA area:

    Please Login or Register  to view this content.
    note the treatment of the comment text here is little different - I have created a variable as the same text is deleted in the first half of the macro, and added in the second half.
    Last edited by NickyC; 08-09-2012 at 09:24 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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