+ Reply to Thread
Results 1 to 6 of 6

255 character limit

  1. #1
    Noah
    Guest

    255 character limit

    I am using the macro1 to grab values from a closed workbook. Column Z
    contains text cells, many of which have text strings of approximately 1000
    characters...so I am running into problems with the 255 character limit. Is
    there a way to modify the Looper macro at
    http://support.microsoft.com/kb/213841/ or some different macro in order to
    pull in the full text length of those cells in column z? Thanks! -Noah

    Sub Macro1()
    With Range("A1:Z1000")
    .FormulaR1C1 = "='[Book1.xls]Sheet1!RC"
    .Formula = Range("A1:Z1000").Value
    End With


  2. #2
    Tom Ogilvy
    Guest

    Re: 255 character limit

    Dim sh as Sheet, bk as Workbook
    Application.ScreenUpdating = False
    set sh = Activesheet
    set bk = workbooks.Open("C:\MyFolder\Book1.xls")
    sh.Range("A1:Z1000").Value = _
    bk.Worksheets("Sheet1").Range("A1:Z1000").Value
    bk.Close SaveChanges:=False
    Application.ScreenUpdating = True

    Untested, but see if this is acceptable/works.

    --
    Regards,
    Tom Ogilvy



    "Noah" <[email protected]> wrote in message
    news:[email protected]...
    > I am using the macro1 to grab values from a closed workbook. Column Z
    > contains text cells, many of which have text strings of approximately 1000
    > characters...so I am running into problems with the 255 character limit.

    Is
    > there a way to modify the "Looper" macro at
    > http://support.microsoft.com/kb/213841/ or some different macro in order

    to
    > pull in the full text length of those cells in column z? Thanks! -Noah
    >
    > Sub Macro1()
    > With Range("A1:Z1000")
    > .FormulaR1C1 = "='[Book1.xls]Sheet1!RC"
    > .Formula = Range("A1:Z1000").Value
    > End With
    >




  3. #3
    Peter T
    Guest

    Re: 255 character limit

    Cell formula length limit is 1024 though can be a bit less. But the .Value
    limit is 32K for text strings (though not displayed).

    Try changing

    > .Formula = Range("A1:Z1000").Value


    to

    > .Value = Range("A1:Z1000").Value


    In the sample you posted I think you are missing an apostrophe before the !
    in the formula. string

    Regards,
    Peter T

    "Noah" <[email protected]> wrote in message
    news:[email protected]...
    > I am using the macro1 to grab values from a closed workbook. Column Z
    > contains text cells, many of which have text strings of approximately 1000
    > characters...so I am running into problems with the 255 character limit.

    Is
    > there a way to modify the "Looper" macro at
    > http://support.microsoft.com/kb/213841/ or some different macro in order

    to
    > pull in the full text length of those cells in column z? Thanks! -Noah
    >
    > Sub Macro1()
    > With Range("A1:Z1000")
    > .FormulaR1C1 = "='[Book1.xls]Sheet1!RC"
    > .Formula = Range("A1:Z1000").Value
    > End With
    >




  4. #4
    Tom Ogilvy
    Guest

    Re: 255 character limit

    Possibly the problem has already manifested by the time that code is
    executed:

    http://support.microsoft.com/kb/211878/en-us
    XL2000: Linked Formula May Return a Maximum of 255 Characters

    --
    Regards,
    Tom Ogilvy


    "Peter T" <peter_t@discussions> wrote in message
    news:[email protected]...
    > Cell formula length limit is 1024 though can be a bit less. But the .Value
    > limit is 32K for text strings (though not displayed).
    >
    > Try changing
    >
    > > .Formula = Range("A1:Z1000").Value

    >
    > to
    >
    > > .Value = Range("A1:Z1000").Value

    >
    > In the sample you posted I think you are missing an apostrophe before the

    !
    > in the formula. string
    >
    > Regards,
    > Peter T
    >
    > "Noah" <[email protected]> wrote in message
    > news:[email protected]...
    > > I am using the macro1 to grab values from a closed workbook. Column Z
    > > contains text cells, many of which have text strings of approximately

    1000
    > > characters...so I am running into problems with the 255 character limit.

    > Is
    > > there a way to modify the "Looper" macro at
    > > http://support.microsoft.com/kb/213841/ or some different macro in order

    > to
    > > pull in the full text length of those cells in column z? Thanks! -Noah
    > >
    > > Sub Macro1()
    > > With Range("A1:Z1000")
    > > .FormulaR1C1 = "='[Book1.xls]Sheet1!RC"
    > > .Formula = Range("A1:Z1000").Value
    > > End With
    > >

    >
    >




  5. #5
    Tom Ogilvy
    Guest

    Re: 255 character limit

    Possibly the problem has already manifested by the time that code is
    executed:

    http://support.microsoft.com/kb/211878/en-us
    XL2000: Linked Formula May Return a Maximum of 255 Characters

    --
    Regards,
    Tom Ogilvy


    "Peter T" <peter_t@discussions> wrote in message
    news:[email protected]...
    > Cell formula length limit is 1024 though can be a bit less. But the .Value
    > limit is 32K for text strings (though not displayed).
    >
    > Try changing
    >
    > > .Formula = Range("A1:Z1000").Value

    >
    > to
    >
    > > .Value = Range("A1:Z1000").Value

    >
    > In the sample you posted I think you are missing an apostrophe before the

    !
    > in the formula. string
    >
    > Regards,
    > Peter T
    >
    > "Noah" <[email protected]> wrote in message
    > news:[email protected]...
    > > I am using the macro1 to grab values from a closed workbook. Column Z
    > > contains text cells, many of which have text strings of approximately

    1000
    > > characters...so I am running into problems with the 255 character limit.

    > Is
    > > there a way to modify the "Looper" macro at
    > > http://support.microsoft.com/kb/213841/ or some different macro in order

    > to
    > > pull in the full text length of those cells in column z? Thanks! -Noah
    > >
    > > Sub Macro1()
    > > With Range("A1:Z1000")
    > > .FormulaR1C1 = "='[Book1.xls]Sheet1!RC"
    > > .Formula = Range("A1:Z1000").Value
    > > End With
    > >

    >
    >




  6. #6
    Peter T
    Guest

    Re: 255 character limit

    Hi Tom,

    Yes, you and the article are right. What I posted works if the source file
    is open but if closed strings are truncated to 255.

    Also, I can't get the RC method to work with a closed file, maybe I'm not
    getting the formula string right. I can though do this -

    Sub Test()
    Dim sFla As String

    sFla = "='C:\My Documents\Excel\[Tmp.xls]Sheet1'!A1"
    Range("A1").Formula = sFla
    Range("A1").AutoFill Range("A1:A1000")
    Range("A1:A1000").AutoFill Range("A1:Z1000")
    Range("A1:Z1000").Value = Range("A1:Z1000").Value

    End Sub

    But if the source is closed strings are max 255

    The OP should use the method you posted, perhaps first try and reference the
    file to check if it is already open

    Regards,
    Peter T

    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > Possibly the problem has already manifested by the time that code is
    > executed:
    >
    > http://support.microsoft.com/kb/211878/en-us
    > XL2000: Linked Formula May Return a Maximum of 255 Characters
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Peter T" <peter_t@discussions> wrote in message
    > news:[email protected]...
    > > Cell formula length limit is 1024 though can be a bit less. But the

    ..Value
    > > limit is 32K for text strings (though not displayed).
    > >
    > > Try changing
    > >
    > > > .Formula = Range("A1:Z1000").Value

    > >
    > > to
    > >
    > > > .Value = Range("A1:Z1000").Value

    > >
    > > In the sample you posted I think you are missing an apostrophe before

    the
    > !
    > > in the formula. string
    > >
    > > Regards,
    > > Peter T
    > >
    > > "Noah" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I am using the macro1 to grab values from a closed workbook. Column Z
    > > > contains text cells, many of which have text strings of approximately

    > 1000
    > > > characters...so I am running into problems with the 255 character

    limit.
    > > Is
    > > > there a way to modify the "Looper" macro at
    > > > http://support.microsoft.com/kb/213841/ or some different macro in

    order
    > > to
    > > > pull in the full text length of those cells in column z?

    Thanks! -Noah
    > > >
    > > > Sub Macro1()
    > > > With Range("A1:Z1000")
    > > > .FormulaR1C1 = "='[Book1.xls]Sheet1!RC"
    > > > .Formula = Range("A1:Z1000").Value
    > > > End With
    > > >

    > >
    > >

    >
    >




+ 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