+ Reply to Thread
Results 1 to 6 of 6

MACRO If cell = value then insert comment

  1. #1
    Registered User
    Join Date
    10-25-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    MACRO If cell = value then insert comment

    Hi All,

    I am currently trying to write a macro which will read the individual cell values in Column I (i), should that value be greater than 1.1, then insert a comment “greater than 1.1” into the corresponding cell in column S. I.e. should column I2 (i2) has the value 1.3, then cell S2 will have the comment “greater than 1.1" inserted, this will then be repeated for all cells.

    Thanks in advance!
    Last edited by chan069; 10-25-2012 at 04:23 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: If cell = value then insert comment

    Put this formula in S2 and drag down as required -
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    10-25-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: If cell = value then insert comment

    Hi Arlette,

    I was wanting to run this within a Macro over the entire range within Column i.

    Cheers,

    Chan

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: MACRO If cell = value then insert comment

    Try this
    Please Login or Register  to view this content.
    If you want to pastespecial the values then you can add one more line of code before the End With
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-25-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: MACRO If cell = value then insert comment

    Excellent, works perfectly! Any chance of being able to bold and colour the inserted text red?

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: MACRO If cell = value then insert comment

    Add this code to the end of your code -
    Please Login or Register  to view this content.

+ 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