+ Reply to Thread
Results 1 to 18 of 18

Autocomments to display cell history

  1. #1
    Registered User
    Join Date
    06-08-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    33

    Autocomments to display cell history

    I am trying to find a way to automatically add comments to specific cells. I want to be able to create a cell history. For example:

    Say I have the number "5" entered in cell A2 and the word "vase" in cell B2. If I then enter the number "3" in cell A2 and the word "bowl" in cell B2 I want it to automatically add the original number "5" and word "vase" in a comments box for cell A2 that appears when you hover the cursor over the cell.

    Is this at all possible? If so does anyone have a code suggestion?

    Any help would be much appreciated.

    Thanks

  2. #2
    Registered User
    Join Date
    06-08-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Autocomments to display cell history

    Does anybody have any ideas to this question? Even if it's just to let me know that it is possible or not.

    Any help would be great.

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Autocomments to display cell history

    mtsykes28,

    This can be done with a worksheet_change event. Here's the code you would use. To use this code, right-click on the sheet tab and select "View Code", then copy paste this code into there:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    06-08-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Autocomments to display cell history

    Thanks tigeravatar

    Is there a way to link multiple cells into just one comment box rather than have them pop up for each individual cell.

    e.g. A1 & B1 cell contents merge into A1 comment box only

    Thanks

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Autocomments to display cell history

    Would that be for:
    All cells? (so if changes were made anywhere, the comment containing all changes would appear in A2)

    or

    Just that row? (so if changes were made on row 3, the comment containing those changes would appear in A3)

  6. #6
    Registered User
    Join Date
    06-08-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Autocomments to display cell history

    My spreadsheet basically works in two column pairs. So cells B and C are linked, E and F, G and H, J and K, L and M, O and P, R and S, U and V, W and X, Z and AA, AB and AC and AE and AF.

    There are 50 rows used in each column.

    So B2 and C2 should merge, B3 and C3 and so on going down the rows. Then E2 and F2, G2 and H2 etc continuing across the columns and down their respective rows.

    Hope that all makes sense.

    Thanks

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Autocomments to display cell history

    mtsykes28,

    Alright, I think I got it. Give this a try:
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    06-08-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Autocomments to display cell history

    Tigeravatar,

    Thank you very much for all your help. It works perfectly.

    Until the next excel question...

    Thanks

  9. #9
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Autocomments to display cell history

    Received private message:
    Quote Originally Posted by mtsykes28
    I have a quick question regarding your code. At the moment the comment box is attached to the cells in the following column order; BC, EF, GH, JK, LM, OP, RS, UV, WX, ZAA, ABAC and AEAF.

    I have tried to change it to the following but with no success. BC, FE, GH, KJ, LM, PO, RS, VU, WX, AAZ, ABAC and AFAE. I hope that makes sense.

    Is it at all possible?

    Thanks


    From the forum rules:

    4. Don't Private Message or email questions to moderators or other members. The point of having a public forum is to share solutions to common (and sometimes uncommon) problems with all members.


    Alright, now that the ugly part is out of the way, I'm taking a look at the question, and will have a reply shortly

  10. #10
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Autocomments to display cell history

    Alright, so if I'm understanding you correctly, you want the comment box in the second column instead of the first column for each grouping, is that right?

  11. #11
    Registered User
    Join Date
    06-08-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Autocomments to display cell history

    No. I want it to alternate depending on the specific column. At the moment it is BC, EF, GH, JK etc. I want it to be BC, FE, GH, KJ.

    Sorry about the private message - as the post was marked as solved I was not sure if you would be able to read it. My apologies.

  12. #12
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Autocomments to display cell history

    mtsykes28,

    Ah, gotcha. In that case, give this a try:
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    06-08-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Autocomments to display cell history

    The comments for BC, GH, LM etc are working fine. However the comments are now becoming seperated when it comes to columns FE, KJ, PO etc. So it reads F and the value, E and the value rather than the two combined in F.

    Hope that makes sense.

    Thanks

  14. #14
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Autocomments to display cell history

    Updated code, let me know if there are still bugs:
    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    06-08-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Autocomments to display cell history

    The comments for FE, KJ, PO etc are now working fine. However the comments in BC, GH, LM etc are now becoming seperated. So it reads B and the value, C and the value rather than the two combined in B.

    Hope that makes sense.

    So what we have is the code from post 12 working the right way for BC, GH, LM etc and the code from post 14 working the right way for FE, KJ, PO etc. Now just need to combine the two.

    Thanks for your continued help.

  16. #16
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Autocomments to display cell history

    Ok, I see the problem.

    Change this line:
    Please Login or Register  to view this content.


    To be this instead:
    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    06-08-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Autocomments to display cell history

    Works! Thats perfect.

    Thanks very much for all of your help.

  18. #18
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Autocomments to display cell history

    You're very welcome

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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