Forum Discussion
valentingiaufer
Oct 18, 2023Copper Contributor
Automatically added @ in formulas
Hello I want to add a formula in my cell: =SheetNameFunc()&""-""&ANNEE(AUJOURDHUI())&""-""&MOIS(AUJOURDHUI()) But each time the formula is added in the cell, excel automatically add...
- Oct 19, 2023
The Formula property expects a formula in English. You could use
ThisWorkbook.Sheets(SheetName).Range("H1").Formula = "=TEXTJOIN(""-"",,""Export"",SheetNameFunc(),YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))
To specify it in your local language, use FormulaLocal:
ThisWorkbook.Sheets(SheetName).Range("H1").FormulaLocal = "=JOINDRE.TEXTE(""-"";;""Export"";SheetNameFunc();ANNEE(AUJOURDHUI());MOIS(AUJOURDHUI());JOUR(AUJOURDHUI()))
HansVogelaar
MVP
Thanks. I'm afraid I don't know what causes the problem; I hope that someone else will have a helpful suggestion for you.
valentingiaufer
Oct 19, 2023Copper Contributor
Is it the right way to get the year and month or is there an other way that could help ?