Hello all,
I have an extremely long (1440 characters) formula that I'm trying to add to a VBA script to paste into a range of cells. The formula itself works fine in a spreadsheet, and the VBA script to select my cell range and paste into the cells also works fine. The problem is that whenever I try to paste my formula into my script, I get an error.
It would seem that there is a maximum character length to lines in VBA, which is too low to accomodate my whole formula. Can someone please confirm if that is the case and if so are there any workarounds?
I considered breaking the formula apart into text strings, pasting them into empty cells, then concatenating the contents of the cell back into a single string and pasting that string into my range of cells, but I couldn't make that work either. And of course it would be nice if I didn't have to go that route.
Here is my VBA script:
And here is my unwieldy formula formatted with double quotation marks for pasting into my script:
The formula itself is basically irrelevant because it works fine on its own. Only the length of it seems to be significant.
Thanks in advance.
Bookmarks