1

I am working in C# and Excel.
I have some to code to add a formula to Excel cells:

excelworksheet_default.Range["K66"].Value = "=MIN(IF((C60:C74)=C64,I60:I74))";

My problem is that Excel automatically adds "@" in my formula:

(see image)

This "@" changed the dynamic array of my formula. (Here s the link of Microsoft support).

Do you have any solution to avoid this problem. Thank you for your help. I hoped I well expressed my question.

GSerg
  • 76,472
  • 17
  • 159
  • 346
  • Could it be C# is adding that? I have pasted formulae using vba and that has never happened, well at least to me. – Solar Mike Jul 09 '20 at 07:17
  • I have closed the question since I think the issue is related to the duplicate. If it isn't then please let me know so I can re-open the question. But for now, try to use `Formula2` instead of `Value`. – JvdV Jul 09 '20 at 07:23
  • I cant find `Formula2`. I tried with `Value2` and `Formula` but it still doesn't work. – Hoàng Tiến Tạ Jul 09 '20 at 07:31
  • 1
    @JvdV: It works with `FormulaArray`. Thank you for your help, and your post. – Hoàng Tiến Tạ Jul 09 '20 at 07:42

0 Answers0