+ Reply to Thread
Results 1 to 7 of 7

Create a dynamic comment based on values in another sheet

  1. #1
    Registered User
    Join Date
    01-03-2014
    Location
    Winnipeg, Manitoba
    MS-Off Ver
    Excel 2007
    Posts
    10

    Create a dynamic comment based on values in another sheet

    Hi,

    I have been trying to find the answer for this for a few days and I am stumped. There are lots of solutions for turning cell values in to comments but none of them seem to match or work with what I need. Here is what I need to do:

    In a workbook, Sheet2 Range B14:M14 contains values

    I need to dynamically create comments with the contents of those cells and add them as comments to Sheet1 in Cells C14,E14,G14,I14,K14,M14,O14,Q14,S14,U14,W14,Y14

    So to be absolutely clear:

    Sheet2 B14 contents becomes a comment in cell C14 of Sheet1
    Sheet2 C14 contents becomes a comment in cell E14 of Sheet1
    Sheet2 D14 contents becomes a comment in cell G14 of Sheet1
    Sheet2 E14 contents becomes a comment in cell I14 of Sheet1
    Sheet2 F14 contents becomes a comment in cell K14 of Sheet1
    Sheet2 G14 contents becomes a comment in cell M14 of Sheet1
    Sheet2 H14 contents becomes a comment in cell O14 of Sheet1
    Sheet2 I14 contents becomes a comment in cell Q14 of Sheet1
    Sheet2 J14 contents becomes a comment in cell S14 of Sheet1
    Sheet2 K14 contents becomes a comment in cell U14 of Sheet1
    Sheet2 L14 contents becomes a comment in cell W14 of Sheet1
    Sheet2 M14 contents becomes a comment in cell Y14 of Sheet1

    The comments must update any time the values in Sheet2 change and the solution must work with Excel 2007.

    Any advice would be gratefully appreciated!

    K.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Create a dynamic comment based on values in another sheet

    worksheet_change event should do the trick

    what to do if existing comment in cell?
    overwrite?
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Create a dynamic comment based on values in another sheet

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-03-2014
    Location
    Winnipeg, Manitoba
    MS-Off Ver
    Excel 2007
    Posts
    10
    Thanks for the speedy response. I must be doing something wrong as this doesn't seem to be doing anything at all. Not sure if it should be placed in the code for sheet one or sheet two?

    Quote Originally Posted by humdingaling View Post
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Create a dynamic comment based on values in another sheet

    As I got it the code would be put in Sheet2 module as the changes in Sheet2 would be followed by inserting comments in Sheet1
    Regards
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Create a dynamic comment based on values in another sheet

    yes...What yasser said

    one point to make though....if the range of change is greater than one cell error will error
    basically put if you fill right or down it will crash
    if you copy and paste more than one cell it will crash (that intersects Range("B14:M14") it will crash)

    i dont know of a way to make it work (or at least an easy way) with this in mind. To make sure it doesn't stop the program all together a error trap
    you can remove the msgbox at the end and it will not stop the code ...you wont know if it didnt work though

    Please Login or Register  to view this content.

  7. #7
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Create a dynamic comment based on values in another sheet

    That code will work if the cells on Sheet2 get their values from user entry. If any of Sheet2!B14:M14 contain formulas, you'd have to use code like this
    Please Login or Register  to view this content.
    And that would work only if all the precedents of Sheet2!B14:M14 were on Sheet2.

    If Sheet2!B14:M14 have formulas that take some values from off that sheet, you'd have to put code like this in the ThisWorkbook code module

    ' in ThisWorkbook code module

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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. Replies: 2
    Last Post: 03-20-2016, 04:54 AM
  2. [SOLVED] VBA Help needed to create sheet based on master sheet column cell values
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-12-2016, 04:58 PM
  3. Create a dynamic list based on multiple dynamic factors.
    By sabin348 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-07-2015, 11:05 AM
  4. [SOLVED] Dynamic sheet reference based on adjacent cell values
    By scohn14 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-21-2015, 01:50 PM
  5. Want to Create a Dynamic List Excel based on a few columns in another sheet .
    By debsankardas in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2013, 10:58 AM
  6. Create a Dynamic Tool Tip or Comment
    By rparker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-31-2012, 01:00 PM
  7. [SOLVED] Create comment box from cell values
    By elevdown in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2012, 09:02 AM

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