1

I would like to name my excel sheet in English format. My system settings are in German and i can't change that. I need to get the previous month name in english. I used the below code and formula.

I also tried using custom date settings for one cell and assign the cell value to sheet name.But nothing working. Help me

Sub name()
ActiveSheet.Name = Format(DateAdd("M", -1, Now), "MMMM")
End Sub

Choose(MONTH(TODAY())-1, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")

=TEXT(DATE(YEAR(TODAY());MONTH(TODAY())-1;DAY(TODAY()));"MMMM")
Deepak
  • 473
  • 1
  • 10
  • 32

1 Answers1

5

Try

ActiveSheet.Name = Application.Text(DateAdd("M", -1, Now),"[$-409]MMMM") 

[$-409] forces english names for day and month names (but it seems to be ignored by Format). See https://stackoverflow.com/a/899290/7599798

FunThomas
  • 23,043
  • 3
  • 18
  • 34