+ Reply to Thread
Results 1 to 2 of 2

Maximum lenght for string? Or what's the issue?

  1. #1
    Registered User
    Join Date
    01-26-2009
    Location
    Hanko, Finland
    MS-Off Ver
    Excel 2003
    Posts
    13

    Maximum lenght for string? Or what's the issue?

    Project is rolling forward but yet another crash. This time issue comes mainly from one ungodly long formula that I would need to fit into the macro. However it isn't working ATM and the length of it is causing "some" headache just in trying to figure out what the heck it's supposed to be doing! Finally I opted to split the formula in 3 parts(hoping I could figure out () parts right) and combine them in the end. However it isn't working and tossing 1004 run time errors.

    Now why I'm asking is that in debugger the result text stops short in the locals view. Specifically shortly after part2 it cuts short and rest is missing. Is there maximum limit to string variables which I have exceeded(and which would obviously then cause runtime errors) or is there something other I'm missing? Again the original formula in the cell was working so that's not issue. It's something in my way of trying to do it in macro rather than directly in the cell.

    And here's the code.

    Edit: Removed as it's no longer needed

    B and C columns are string variables that function this in in receives as arquments(and are coming in correctly as far as debugger can tell).

    Edit: Sorry! Solved this myself finally. Just needed whole bunch of " more. You really need to be careful with those!
    Last edited by tneva; 01-27-2009 at 08:32 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Maximum lenght for string? Or what's the issue?

    I *believe* in 2003 the limit in Excel is 1024 chars for formulae and your formula appears to sit within those boundaries (albeit we don't know the lengths of the variables to which you refer in the formula).

    Without seeing the code in full & without knowing how your named ranges are set up it's hard to be precise.

    To test the formula itself...

    If you *can* write back the "result" to the cell as a String rather than a formula and then manually force to a formula in native XL does the formula evaluate correctly ?

+ 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