Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
litLIB: #Value error using string functions (Read 1645 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
litLIB: #Value error using string functions
04.12.09 at 10:24:25
 
litLIB: #Value error using string functions
 
Only 255 characters can be passed to a user defined function (UDF) . This has to do with pointers to strings (as Excel uses) and literal strings (as VB or VBA uses). In the following example a very long string (up to 32,767) can be successfully used:
A1: =Webpage("www.google.com")
A2: =ReplaceAll(A1,"<td>"," ")
 
Using the same formulas nested causes a #Value error as the ReplaceAll function can only take 255 characters as literal string input. Going through another cell will make Excel pass the value in as a pointer as in the previous example.
A1: =ReplaceAll(Webpage("www.google.com"),"<td>"," ")
 
As a fix you can modify the WebPage formula to only pass 255 charactrs:
A1: =ReplaceAll(Webpage("www.google.com",1,255),"<td>"," ")
Back to top
 
« Last Edit: 04.12.09 at 10:24:39 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1