I'm using vba for Excel in order to save data into an array by:
Dim allPosts As Variant
allPosts = Range("A2:J5000")
after that I'm changing data in the allPosts
array, and then I want to paste it back by:
Range("A2:J5000").Value = allPosts
I'm getting the error:
run time error 1004 Application-defined or object-defined
and the copy stops at a specific cell, when i change the string at this cell to be shorter the problem is solved.
thanks
You can use a second array to store the cell lengths that are too long, and separately iterate over these
From this Microsoft Support Article excel-2003 can't handle writing back array strings longer than 911 characters excel-2010 worked fine on my testing)
The code below:
code