F
Fredrik Wahlgren
Hi
Inspired by the add-in project found at
http://www.codeproject.com/dotnet/excelnetauto.asp, I decided to make
something different. Unfortunately, I got the #VALUE error whenever I
entered my function. I then noticed that the function would work as expected
ONLY if all parameters had been entered. So the problem is
1) =Test("A","B","C") -> "A" This is OK
2) =Test("A","B") -> #VALUE This is not OK, I still expect "A" to
be returned
How can I fix this? The code is below.
TIA,
Fredrik
public String Test(string s1, string s2, string s3)
{
String retval;
retval = sPer;
return retval;
}
Inspired by the add-in project found at
http://www.codeproject.com/dotnet/excelnetauto.asp, I decided to make
something different. Unfortunately, I got the #VALUE error whenever I
entered my function. I then noticed that the function would work as expected
ONLY if all parameters had been entered. So the problem is
1) =Test("A","B","C") -> "A" This is OK
2) =Test("A","B") -> #VALUE This is not OK, I still expect "A" to
be returned
How can I fix this? The code is below.
TIA,
Fredrik
public String Test(string s1, string s2, string s3)
{
String retval;
retval = sPer;
return retval;
}