ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Replace vs Application.Substitute (https://www.excelbanter.com/excel-programming/378051-replace-vs-application-substitute.html)

Ski

Replace vs Application.Substitute
 
When replacing text in cells with lots of text, using Replace() will
return a "Formula too Long" error. If I use Application.Substitute, it
replaces text just fine. Anyone know why? Thanks.


Martin Fishlock

Replace vs Application.Substitute
 
The replace function must use a fixed length string rather than a variable
length string whereas the application.substitute uses a variable length
string.

It is the same when you try and copy a worksheet that has text that is more
than 255 characters long it truncates it.

--
Hope this helps
Martin Fishlock


"Ski" wrote:

When replacing text in cells with lots of text, using Replace() will
return a "Formula too Long" error. If I use Application.Substitute, it
replaces text just fine. Anyone know why? Thanks.




All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com