Forum Discussion

valentingiaufer's avatar
valentingiaufer
Copper Contributor
Oct 18, 2023

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...
  • HansVogelaar's avatar
    HansVogelaar
    Oct 19, 2023

    valentingiaufer 

    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()))

Resources