+ Reply to Thread
Results 1 to 10 of 10

Show cell value(text) in comment box text with a particular arrangement

  1. #1
    Registered User
    Join Date
    03-24-2013
    Location
    Apple Valley, MN
    MS-Off Ver
    Excel 2010
    Posts
    29

    Show cell value(text) in comment box text with a particular arrangement

    This is a question based off this post http://www.excelforum.com/showthread.php?t=623335

    Specifically I am working with this code from that post

    Please Login or Register  to view this content.
    The above code
    will display the range A1:C4 in the comment box as
    A1
    B1
    C1
    A2
    B2
    C2
    A3
    B3
    C3
    A4
    B4
    C4

    I would like to edit the code so that if input the above example range the comment would display the values as
    A1 B1 C1
    A2 B2 C2
    A3 B3 C3
    A4 B4 C4



    Thanks for your help!

  2. #2
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: Show cell value(text) in comment box text with a particular arrangement

    This might be what you want…

    Please Login or Register  to view this content.
    Last edited by StuCram; 07-25-2015 at 10:57 AM.

  3. #3
    Registered User
    Join Date
    03-24-2013
    Location
    Apple Valley, MN
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Show cell value(text) in comment box text with a particular arrangement

    Thanks so much for your quick reply!!!
    However can you tweak it so the range of cells can be flexible for example I could display
    A1 B1
    A2 B2

    or
    A1 B1 C1 D1 E1
    A2 B2 C2 D2 E2
    A3 B3 C3 D3 E3

    Also how would you add a white space between the values of the cells in the same row?
    Thanks!!

  4. #4
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: Show cell value(text) in comment box text with a particular arrangement

    Here's the revision you requested, with an extra parameter to specify how many items per row you want.
    PS Are you sure you want a function to do this? It looks to me that it should be a SUB.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-24-2013
    Location
    Apple Valley, MN
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Show cell value(text) in comment box text with a particular arrangement

    That code causes the cell to show the #VALUE! error and then still displays a result in the comment box but only
    A1 B1
    A2 B2
    A3 B3

    even if I input the range A1:C3

  6. #6
    Registered User
    Join Date
    03-24-2013
    Location
    Apple Valley, MN
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Show cell value(text) in comment box text with a particular arrangement

    Maybe a SUB would be better

  7. #7
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: Show cell value(text) in comment box text with a particular arrangement

    oops - I see a missing line that may have caused the error.


    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: Show cell value(text) in comment box text with a particular arrangement

    Hi again

    Here's a modified (and tested) SUB version of the previously proposed solution.

    Please Login or Register  to view this content.
    Note that the comment object will have a default size and the comment, if too large, may not fit. You would have to resize the comment box in that case.

    Hope this helps.

  9. #9
    Registered User
    Join Date
    03-24-2013
    Location
    Apple Valley, MN
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Show cell value(text) in comment box text with a particular arrangement

    Thank you, Thank you!! The sub actually works better because I realized that I wanted to add the comment to cells that already have formulas in them.
    Thanks again!

  10. #10
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: Show cell value(text) in comment box text with a particular arrangement

    Good to hear.


    Note: The 'Application.Volatile' line can be removed. It has no effect in the sub

    Now that it's working, please add to my reputation - click on the star at the bottom-left corner of this message.

    Best wishes,
    - Stu

+ 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. Show cell value(text) in comment box text, or mouse tool tip on an gif icon
    By JIBG in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 05-19-2014, 06:50 AM
  2. Cell's text / comment (no comment )
    By Marianus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-22-2013, 06:05 AM
  3. cell B will automatically show a text depending on the text on column A
    By Elainefish in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-05-2013, 05:57 AM
  4. How to change the arrangement of text in a cell
    By Starbucks Junkie in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-24-2013, 09:57 AM
  5. [SOLVED] Can't show cell comment text in Msgbox
    By zbor in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-02-2012, 05:51 AM
  6. Compare cell text to set list and show text differences
    By NSTurk725 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-06-2009, 09:54 PM
  7. Arrangement of text in a cell
    By brettg in forum Excel General
    Replies: 1
    Last Post: 04-26-2006, 04:45 PM
  8. [SOLVED] show different text in a text box depending on cell value
    By John Davies in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2005, 06:05 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