Hi,
I just wanted to know how to write '=CoorY(posx;2)' into a cell from a macro VBA.
Thank you
Printable View
Hi,
I just wanted to know how to write '=CoorY(posx;2)' into a cell from a macro VBA.
Thank you
Thread moved from 'VB.Net' forum to 'Office Development/VBA' forum.
This, of course, is presuming your forumla is correct and error free.Code:Worksheets("Sheet1").Range("A18").Formula = "=CoorY(posx;2)"
I've a problem with that: Error 1004.
Actually I cannot enter the parenthesys in the sequence.
Thank you
Show me the code for CoorY(). What is the semicolon for?
I don't think that the code doesn't matter since I tried to do it with any other function and it didn't work either. For exemple:
The thing is that I can write until the parenthesis, like :Code:Sheets("Calculs").Range("K83").Formula = "=SOMME(4;5)"
But then if I write:Code:Sheets("Calculs").Range("K83").Formula = "=SOMME"
I get the error so I think that there is a special way to write it but I don't find it.Code:Sheets("Calculs").Range("K83").Formula = "=SOMME("
Thank you
you need to show the full function, including the header line
Have you mixed-up US-version and France-version of Excel?
France: "=SOMME(4; 5)"
US: "=SUM(4, 5)"
you could try like
Range("a3").Formula = "=somme(4,5)"
ok,
I've just seen what I was doing wrong:
My version is in french and even if in excel you write '=somme(4;5)' directly into the cell, when you want to do it from VBA you have to write :
So, there are two important things:Code:Sheets("Sheet1").range("A1").formula="=SUM(4,6)"
-The name of the function in VBA is always in english
-The semicolon in excel is ',' in VBA
Thank you everybody
I hadn't seen your answers in my last reply, if I had knew I wouldn't have written the same thing again!!!
But yes, it was that, thank you
you can look at using formulalocal to insert formulas in your local language