SOLVED

How to remove @ character in formula in excel

Copper Contributor

I use C# to create formulas in excel and have encountered a problem: The formula always appears the @ character immediately after the = sign and the result always gives the error #VALUE!.
After creating the formula, I used the Replace function to remove the @ character, but it didn't work.
Please, how to remove the @ character in the formula?

hoacvxd_0-1669964634562.pnghoacvxd_1-1669964716381.png

 

 

2 Replies
best response confirmed by hoacvxd (Copper Contributor)
Solution

@hoacvxd 

Try

 

endRan.Formula2 = strFormula;

@Hans Vogelaar 

Thank you, after I switched to cells object and applied Formula2 this solved the problem.

hoacvxd_0-1669991317150.png

 

1 best response

Accepted Solutions
best response confirmed by hoacvxd (Copper Contributor)
Solution

@hoacvxd 

Try

 

endRan.Formula2 = strFormula;

View solution in original post