+ Reply to Thread
Results 1 to 4 of 4

cell length issue

  1. #1
    Forum Contributor
    Join Date
    04-29-2012
    Location
    nuneaton, England
    MS-Off Ver
    Excel 2007
    Posts
    366

    cell length issue

    Hi all,

    i have a macro that looks at a cell in column U and creates it as a comment in column V

    It works ok but when the contents of the cell U exceed 255 characters, the comment box wont create. Is there a way of getting around this. I have checked the code and it is definitely the 255 character issue as if it is 255 it works, but if it goes to 256 it doesnt.

    PHP Code: 
    Sub TestForCommentsMacro()
    '
    TestForComments Macro
    '

    '
    '#########################################################
    '
    Create comment from cell value

    Range
    ("V11:V702").ClearComments
          
    Dim LR 
    As Long

    LR 
    Range("U" Rows.Count).End(xlUp).Row
    For 95 To LR
       Range
    ("V" i).NoteText Text:=Range("U" i).Value

    Next i

    '########################################################


    End Sub 

  2. #2
    Forum Contributor
    Join Date
    04-29-2012
    Location
    nuneaton, England
    MS-Off Ver
    Excel 2007
    Posts
    366

    Re: cell length issue

    i have currently added an if statement to the U cell just to remind me what the problem is (until you helpful people can tell me)

    =IF(LEN(Q24)>255,"Comment To Long to display",Q24)

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: cell length issue

    Untested but try changing this line

    Please Login or Register  to view this content.
    If you are happy with my response please click the * in the lower left of my post.

  4. #4
    Forum Contributor
    Join Date
    04-29-2012
    Location
    nuneaton, England
    MS-Off Ver
    Excel 2007
    Posts
    366

    Re: cell length issue

    Yes, that worked fine ty

+ 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. Cell length formula to remove any characters over 31 in length
    By tehkayd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-02-2015, 11:45 AM
  2. [SOLVED] Shorten string length if exceeds 31 characters (max sheet name length)
    By r2fro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2014, 05:57 AM
  3. Repeat Calculation At Length & Calculate Lowest Value At Length
    By sanju2323 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-17-2013, 09:19 AM
  4. [SOLVED] Finding a formula that will consider length of cell and length of words
    By Mariah B in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-07-2013, 05:39 PM
  5. Replies: 3
    Last Post: 05-28-2013, 10:43 AM
  6. [SOLVED] Cell length VBA to add trailing characters until a specified length is reached
    By bkeller83 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-24-2013, 10:43 PM
  7. Sorting Items by Length for a target length list.
    By Joe Bob Crain in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-06-2006, 12:46 PM

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