+ Reply to Thread
Results 1 to 9 of 9

Formula in textbox linked to cell only shows part of the text

  1. #1
    Registered User
    Join Date
    01-11-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    96

    Formula in textbox linked to cell only shows part of the text

    I have some textboxes that contain formula linking them to a cell value. They only show part of the text in the cell and I can't figure out why. I have attached a sample sheet in case anyone has any ideas.
    Attached Files Attached Files
    Last edited by rosshkerr; 03-13-2012 at 01:06 PM.
    Cheers

    Ross

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Formula in textbox linked to cell only shows part of the text

    Excel will truncate a passed string at 255 characters, so that is why your message is being cut off.
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Formula in textbox linked to cell only shows part of the text

    More than likely you can't have more than 256 characters.
    Use this
    =MID(B13,1,256)
    -you will see it stops at the same place.

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Formula in textbox linked to cell only shows part of the text

    im trying to find a work around by using

    =LEFT(B13,255)&MID(B13,255,255)

    but it appears that a textbox will now allow that formula.

    you could probably enter it in using a VBA macro though.

  5. #5
    Registered User
    Join Date
    01-11-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Formula in textbox linked to cell only shows part of the text

    Quote Originally Posted by davesexcel View Post
    More than likely you can't have more than 256 characters.
    Use this
    =MID(B13,1,256)
    -you will see it stops at the same place.
    Tried this but got an error message stating 'Text you entered is not a valid reference or defined name'

  6. #6
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Formula in textbox linked to cell only shows part of the text

    you may need to result to a VBA macro to get past the 255 character limit, i could not find any other way around it.

  7. #7
    Registered User
    Join Date
    01-11-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Formula in textbox linked to cell only shows part of the text

    Any ideas about what the macro would look like?

  8. #8
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Formula in textbox linked to cell only shows part of the text

    somethign like this:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    01-11-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: Formula in textbox linked to cell only shows part of the text

    Excellent. Thank you very much

+ 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