This project has moved and is read-only. For the latest updates, please go here.

SUM() function gives #NAME error

May 28, 2014 at 7:50 AM
Hello,

I have a little problem by using the Worksheek.Cell.SetFormula Method. When I want to fill in a SUM() Formula Excel don't resolve it and just throws that #NAME error on that Cell.
When I click the Cellvalue and press enter the correct value appears....

Here is my Code:
                if (ws.LastRowUsed(false).RowNumber() == 2)
                {
                    ws.Cell(ws.LastRowUsed(false).RowNumber() + 2, "J").SetFormulaA1("SUMME(J2)");
                }
                else
                {
                    ws.Cell(ws.LastRowUsed(false).RowNumber() + 2, "J").SetFormulaR1C1("SUMME(J2:J" + ws.LastRowUsed(false).RowNumber().ToString() + ")"); 
                }
I hope someone knows this error and can help me with this...it's really frustrating...
Please let me know if you don't understand what I mean :D
May 28, 2014 at 8:04 AM
One second after I posted this I got it :D I changed "SUMME" into "SUM"...solved :)
Marked as answer by Bossi on 5/28/2014 at 12:05 AM