Dear all,
I have made a vba macro code to get date from Excel cells in a special format to be used for follow up.
ActiveCell.FormulaR1C1 = "=TEXT(RC[1],""ÅÅÅÅ-MM-DD"")"
ActiveCell.FormulaR1C1 = "=TEXT(RC[1],""YYYY-MM-DD"")"
In Sweden, Windows regional date format is ÅÅÅÅ-MM-DD. The letter Å stands for År which is Year in English. My colleagues abroad has a modified version of the macro which is YYYY-MM-DD.
I am trying to have only one universal version of the Excel macro and would like to have a code detecting the regional date setting from Windows operative system and use it in the macro. I am using Windows 10 and Microsoft Office 365.
Greatful for any suggestion or help
Kind regards
Ingemar
I have made a vba macro code to get date from Excel cells in a special format to be used for follow up.
ActiveCell.FormulaR1C1 = "=TEXT(RC[1],""ÅÅÅÅ-MM-DD"")"
ActiveCell.FormulaR1C1 = "=TEXT(RC[1],""YYYY-MM-DD"")"
In Sweden, Windows regional date format is ÅÅÅÅ-MM-DD. The letter Å stands for År which is Year in English. My colleagues abroad has a modified version of the macro which is YYYY-MM-DD.
I am trying to have only one universal version of the Excel macro and would like to have a code detecting the regional date setting from Windows operative system and use it in the macro. I am using Windows 10 and Microsoft Office 365.
Greatful for any suggestion or help
Kind regards
Ingemar