+ Reply to Thread
Results 1 to 10 of 10

Thread: Index result too long?

  1. #1
    Registered User
    Join Date
    07-22-2008
    Location
    auburn
    Posts
    64

    Index result too long?

    I'm wondering if there is a limit on the size of a string returned by the "index" function? My function seems to work perfectly and then suddenly stops working once the string being returned gets too big... is there any way around this if this is indeed the problem?
    Last edited by roasthawg; 01-24-2012 at 01:50 PM.

  2. #2
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,225

    Re: Index result too long?

    Your guess is as good as anybody's unless you care to share the code and, ideally the workbook it runs in.

    If there's sensitive data, you need to remove or generalise it before posting.


    Regards, TMS

  3. #3
    Registered User
    Join Date
    07-22-2008
    Location
    auburn
    Posts
    64

    Re: Index result too long?

    It's a macro and the workbook just has so much going on... was hoping to maybe get an answer to the question regarding whether or not there is a limit on the length of a string that can be returned by the "index" function?

  4. #4
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,225

    Re: Index result too long?

    Maybe try Googling for Excel Limits

    http://office.microsoft.com/en-us/ex...005199291.aspx


    Regards, TMS

  5. #5
    Registered User
    Join Date
    07-22-2008
    Location
    auburn
    Posts
    64

    Re: Index result too long?

    Thanks for your help... there's definitely a 255 character limit. Gonna try finding a way around this... maybe by referencing the cell somehow rather than trying to return the value.

  6. #6
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,225

    Re: Index result too long?

    If you've got the cell address, I guess you could check the length of the data and use MID to extract blocks of data.


    Regards, TMS

  7. #7
    Forum Guru martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    10,798

    Re: Index result too long?

    it doesnt limit with text see attached
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and a dabbler in Cisco
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Registered User
    Join Date
    07-22-2008
    Location
    auburn
    Posts
    64

    Re: Index result too long?

    Interesting that it doesn't limit with text. I was able to solve this one by using the "indirect" function and referencing the cell instead of using the "index" function to return a value. Thanks to both of you for the replies!

  9. #9
    Valued Forum Contributor OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,647

    Re: Index result too long?

    What were you trying to return that is over 255 characters long but isn't text?
    Good luck.

  10. #10
    Forum Guru TMShucks's Avatar
    Join Date
    07-15-2010
    Location
    Manchester, England
    MS-Off Ver
    MSO 2003 & 2007
    Posts
    6,225

    Re: Index result too long?

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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.2.0