I'm looking to add an excel function in a string that has ""
in it.
=SUMPRODUCT((B2:B2000<>"")/COUNTIF(B2:D2000,B2:B2000&""))
I've tried to use \"
but no matter how many of them I add together only 1 displays, same happens when I'm trying to use .Replace
or ((char)34)
.
As Ive already said, I want the output to be "" not ".
Is any way I could get that function as intended?
Im writing this string to a .csv
file.
Input:
string suma = @"=SUMPRODUCT((B2:B2000<>"")/COUNTIF(B2:D2000,B2:B2000&""))";
Output: Cell A1 =SUMPRODUCT((B2:B2000<>)/COUNTIF(B2:D2000
Cell B1 B2:B2000&"))"
Imput:
string suma = "=SUMPRODUCT((B2:B2000<>" + ((char)34) + ((char)34) + ")/COUNTIF(B2:D2000" + ((char)44) + "B2:B2000&" + ((char)34) + ((char)34) + "))";
Output: =SUMPRODUCT((B2:B2000<>")/COUNTIF(B2:D2000,B2:B2000&"))
Input: string suma = "=SUMPRODUCT((B2:B2000<>\"\")/COUNTIF(B2:D2000,B2:B2000&\"\"))";
Output: =SUMPRODUCT((B2:B2000<>")/COUNTIF(B2:D2000,B2:B2000&"))
Input: string suma = "=SUMPRODUCT((B2:B2000<>'')/COUNTIF(B2:D2000,B2:B2000&''))";
suma.Replace(@"'",@""");
Output: =SUMPRODUCT((B2:B2000<>'')/COUNTIF(B2:D2000,B2:B2000&''))