Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
...
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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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" wrote in message
...
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
...
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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a character limit within a cell? Allyson Excel Discussion (Misc queries) 1 September 14th 06 02:02 AM
255 Character Limit Colin Excel Discussion (Misc queries) 2 March 2nd 06 07:58 PM
Character Limit Dylan Moran Excel Programming 5 September 9th 05 02:13 AM
Cell 255 character limit & VBA JEff Excel Programming 0 February 10th 05 06:35 PM
Footer character limit Michelle Excel Programming 0 June 3rd 04 08:30 PM


All times are GMT +1. The time now is 04:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"